{% extends "base.html" %} {% block title %}Cron Jobs{% endblock %} {% block content %}
Scheduled background tasks registered at startup. Use
get_scheduler().add_task()
to register tasks programmatically.
Register tasks in your application startup or hooks using the scheduler API.
# In main.py or a hook file
from app.core.scheduler import get_scheduler
get_scheduler().add_task(
"cleanup", "0 2 * * *", cleanup_fn
)
Every minute
* * * * *
Every hour
0 * * * *
Daily at 2 AM
0 2 * * *
Every Sunday midnight
0 0 * * 0
1st of each month
0 0 1 * *
Every 15 minutes
*/15 * * * *