Closed jeremych1000 closed 7 years ago
The best way to set this up would be to set RUN_EVERY_MINS = None
and remove the cron from CRON_CLASSES
.
When you want to call the cron, pass in the force option:
python manage.py runcrons 'some_cron_job' --force
Oh yeah, forgot about None. Thanks @msopko81 .
RUN_EVERY_MINS=0 will make it run every time, deleting Schedule doesn't error out but fails according to the traceback in the cron job logs, and deleting code errors out.
I want to standardize some of my django management commands all to use django_cron, but I don't want to run them on a schedule.
Is it possible to create a django cronjob that only runs if I explicitly run it through
python manage.py runcrons 'some_cron_job'
?