I have this command python myscript.py -rss and it's working well in the terminal but not inside crontab.

I have this in my crontab´:

*/15 * * * * cd /var/www/html && /usr/bin/python /var/www/html/myscript.py -rss >> /var/www/html/myscript.log 

and it's not working… there is nothing in the log.

  • /var/www/html sounds like a web site document root. You should definitely keep scripts and their log files out of there, or else they are susceptible to being accidentally published to the world. – Celada Dec 4 '16 at 10:47

Did you set the cron-job using root? It could be some permission issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.