Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does django-cron work?

A normal approach to cron jobs with a django site would be to use cron to run custom management commands periodically.

But I found this http://code.google.com/p/django-cron/

How does it work, without needing cron? What invokes it to poll?

If it just sets up an address for an http request to hit periodically, what if the job takes a long time, won't the server time out?

like image 557
Eric Avatar asked Jun 28 '11 14:06

Eric


1 Answers

It continually fires off a Timer thread, whose whole purpose is to wait a defined amount of time (the polling frequency you set in settings.py) and then run the execute on the django-cron queue again.

like image 162
Chris Pratt Avatar answered Oct 20 '22 13:10

Chris Pratt