The point is this: there is a custom command in Django, which is called aspython manage.py <команда>
It is necessary to create a cron task that would call this command every minute. How to do it?
Linux Mint distribution.
1 answer
If every minute on workdays:
* * * * 1-5 python manage.py <команда> Every 5 minutes:
*/5 * * * 1-5 python manage.py <команда> This if your manage.py does not have a GUI. If he uses the window manager, you need to add export DISPLAY =: 0 && before the python launch command itself.
- And if I use virtualenv, will I first need to activate virtualenv and then run python manage.py <command>? - Egor Kulik
- I did not use virtualenv , so I will not lie. - Sergey
|