Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Crons #135

Closed
WesleyJohnson opened this issue Dec 21, 2017 · 2 comments
Closed

Disable Crons #135

WesleyJohnson opened this issue Dec 21, 2017 · 2 comments

Comments

@WesleyJohnson
Copy link

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
Copy link

gregschmit commented Feb 7, 2019

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants