django-best-practices
django-best-practices copied to clipboard
How to setup scheduled scripts (e.g. for maintenance)
Please describe how to schedule scripts for simpler tasks. E.g. using BaseCommand. A lot of people suggest setting up urls to start the script, having an external script that import settings and many other complex things. The craziest thing I've seen (but probably useful for some cases) is to have the regular requests from google-bots invoke scripts... That's why I think it's a good thing to suggest managment commands when they're so easy and integrates nicely with your apps.
Common practice is to "just use celery" because it is already there in many cases. http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html
Management tasks + cron work as well. I'll work on adding some documentation around these bits.