Tivix / django-cron

Write cron business logic as a Python class and let this app do the rest! It enables Django projects to schedule cron tasks, tracks their success / failures, manages contention (via a cache) etc. Basically takes care of all the boring work for you :-)
www.tivix.com
MIT License
900 stars 193 forks source link

Disable Crons #135

Closed WesleyJohnson closed 2 years ago

WesleyJohnson commented 6 years ago

It would be nice to be able to disable/enable crons without editing CRON_CLASSES in the settings file. I was thinking perhaps having the crons listed in the database with a flag to toggle them on/off. I realize the code that the a cron calls could implement something, but it would be preferred to control it directly from django-cron.

gregschmit commented 5 years ago

One way to solve your problem though is to have your app/project implement a model that has the enable/disable switch as a BooleanField, then have your do() method in the cronjob class check that value and only actually do anything if the conditions are right.

I would vote to not implement this feature, since it seems like bloat.

JedrzejMaluszczak commented 2 years ago

We are not currently planning such functionality, perhaps in the future.