You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finally, you launch the scheduler in a separate process:
python3 manage.py crontask
Setup Redis as a lock backend (optional)
If you use Redis as a broker, you can use Redis as a lock backend as well.
The lock backend is used to prevent multiple instances of the scheduler
from running at the same time. This is important if you have multiple
instances of your application running.
Please note that the interval is relative to the time the scheduler is started.
For example, if you start the scheduler at 12:00:00, the first run will be at
12:00:30. However, if you restart the scheduler at 12:00:15, the first run will
be at 12:00:45.
Sentry Cron Monitors
If you use Sentry you can add cron monitors to your tasks.
The monitor's slug will be the actor's name. Like my_task in the example above.
The crontask command
$ python3 manage.py crontask --helpusage: manage.py crontask [-h] [--no-task-loading] [--no-heartbeat] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color] [--skip-checks]Run task scheduler for all tasks with the `cron` decorator.options: -h, --help show this help message and exit --no-task-loading Don't load tasks from installed apps. --no-heartbeat Don't start the heartbeat actor.