I am trying to run a custom management command on my Django app, installed under a virtualenvironment.
This task is supposed to run once every minute, and I cannot quite figure out why it doesn't work.
Here's what I have in my crontab:
*/1 * * * * /home/myuser/.virtualenvs/myvirtualenv/bin/python /home/myuser/myapp/manage.py mycommand --settings=myapp.settings
This won't work, even if I see the command executing once a minute in /var/log/syslog
, but it must be failing because it produces no effect.
If I just copy and run the same command, everything goes smooth.
I then tried running instead an external bash script, which again perfectly works if I run it manually:
*/1 * * * * source /home/myuser/myapp/myscript
The script activates the virtualenv and runs the management command. Again, no results.
I am a bit lost, as I've searched around thoroughly and I am completely stuck, as apparently no error messages show up anywhere.