I am having trouble setting up a cron job. My set up is as follows:
crontab -e
*/10 * * * * OTP_ProJect/PandaServerInfo/SVN/PandaQueueMonitoring/trunk/submit_cron_test.sh
the shell script has permissions:
-rwxr--r-- 1 submit_cron_test.sh
submit_cron_test.sh submits a python script:
python2.5 ProcessPlant.py --test
The error I am receiving is as follows:
/bin/sh: /OTP_ProJect/PandaServerInfo/SVN/PandaQueueMonitoring/trunk/submit_cron_test.sh: Permission denied
I have tried the command
/bin/sh /OTP_ProJect/PandaServerInfo/SVN/PandaQueueMonitoring/trunk/submit_cron_test.sh
and this works fine.
Has anyone got any ideas, because I have ran out. :-(
sh /OTP_ProJect/...does not test the executability of the script, only it's readability. Try it directly without the sh prefix. In particular, try the line exactly as it is in crontab. Also, the script is only executable by the file owner. I assume that that user is the same as the user who's crontab has the above entry. – penguin359 Apr 19 '11 at 22:38