Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run cron-like scripts on Django?

Tags:

python

django

To give you a little brief about what I'm tying to do ->
I'm building a timed-contest app which expires at a set datetime.
So basically I want a script which queries my model and changes some values according to busines logic periodically

How would you do this in django ?

like image 370
Sai Krishna Avatar asked Aug 22 '11 08:08

Sai Krishna


2 Answers

You use celery.

http://celery.readthedocs.org/en/latest/userguide/periodic-tasks.html

like image 67
S.Lott Avatar answered Sep 28 '22 20:09

S.Lott


You wouldn't. You'd use cron to run a standalone script or management command.

like image 22
Ignacio Vazquez-Abrams Avatar answered Sep 28 '22 20:09

Ignacio Vazquez-Abrams