I want to run .py script:
python /home/project/manage.py slope_update
If I run it from shell it's OK, but in cron does not work:
*/10 * * * * root python /home/project/manage.py slope_update
What wrong?
I edit my /etc/crontab file from root
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --repo$
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --repo$
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --repo$
#
*/10 * * * * root /usr/bin/python /home/project/manage.py slope_update
With user quanta help:
*/10 * * * * root /usr/bin/python /home/project/manage.py slope_update >> /tmp/foo.log 2>&1
cat foo.log
Unknown command: 'slope_update' Type 'manage.py help' for usage.
Why slope_update try to use as command, but must have as parameter If this "python /home/project/manage.py slope_update" run in terminal it's work. Why?