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

Change kronos interval (Django Admin) #58

Closed
jundymek opened this issue Jun 20, 2017 · 1 comment
Closed

Change kronos interval (Django Admin) #58

jundymek opened this issue Jun 20, 2017 · 1 comment

Comments

@jundymek
Copy link

I have a little problem with call_command in Django. This is my Kronos decorator:

@kronos.register('*/{} * * * *'.format(config.CRON_MIN))
In admin.py I have a function which returns new config.CRON_MIN value and runs call_command to reload cron jobs:

@receiver(config_updated)
def constance_updated(sender, key, old_value, new_value, **kwargs):
    call_command('installtasks')
    print(key, old_value, new_value)

In my terminal window I see:

1 tasks removed, 1 installed.
CRON_MIN 3 4

but when I check it by typing: crontab -l I see cron job with old value of CRON_MIN. When I run installtasks command manually it works as It should (python manage.py installtask). It properly changes interval in kronos cron job. Where I make a mistake? Can you help me?

@jgorset
Copy link
Owner

jgorset commented Mar 27, 2021

Sorry for not getting to this a very long time ago. Closing due to old age, but feel free to reopen the issue or make a pull request if you'd still like to fix it.

@jgorset jgorset closed this as completed Mar 27, 2021
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

2 participants