Skip to content

[FEATURE] Add documentation/example for manual repeat_every usage (outside FastAPI startup events) #375

@Binilkks

Description

@Binilkks

Is your feature request related to a problem? Please describe.
Most documentation and examples for repeat_every show it used with @app.on_event("startup") in FastAPI apps.
However, I want to use repeat_every for periodic jobs in scripts or tests, but there is no clear example or docs section showing how to use it outside of FastAPI startup events.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
Please add a documentation section or example that demonstrates how to use repeat_every by calling the decorated function directly, without relying on FastAPI’s startup event.
For example, show how to use it in a standalone script or in test code.

Additional context
Reading the test code in the repo, but it’s not obvious for new users.
Writing my own scheduling loop, but that defeats the purpose of using repeat_every.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions