How to run cron-like scripts on Django?

To talk a little about what I tie, →
I am creating a time contest application that expires at a given time. So basically I want a script that queries my model and changes some values ​​according to the busines logic periodically

How do you do this in django?

+6
source share
4 answers

You wouldn’t. You would use cron to run a stand-alone script or control command .

+6
source

You can take a look at django-cron http://code.google.com/p/django-cron/

It takes advantage of Django in a lengthy process and spawns a timer thread in a fixed interval. The source code for this plugin is small and easy to understand.

+2
source

I once had a similar problem. I used the kronos.py module from the TurboGears platform:

http://sourceforge.net/p/turbogears1/code/7354/tree/projects/TGScheduler/trunk/tgscheduler/kronos.py

0
source

Source: https://habr.com/ru/post/895566/


All Articles