Periodic/cron task scheduling for django-tasks. Backend-agnostic replacement for celery-beat + django-celery-beat.
pip install django-periodic-tasksAdd to INSTALLED_APPS:
INSTALLED_APPS = [
...
"django_periodic_tasks",
]from django_tasks import task
from django_periodic_tasks import scheduled_task
@scheduled_task(cron="0 5 * * *", name="daily-report")
@task()
def daily_report() -> None:
...Enable the autostart setting so the scheduler runs as a daemon thread inside your Django process:
# settings.py
PERIODIC_TASKS_AUTOSTART = TrueOr run it as a standalone process:
python manage.py run_scheduler