Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having problems with setting my crontab script to run. When I execute it manually it works. My crontab file looks like this:

17 13           1-31 * 1-7              /myscripts/

Could anyone tell me if there are any more nessesary steps needed for it to work?

share|improve this question

migrated from Sep 22 '12 at 22:23

This question came from our site for professional and enthusiast programmers.

check if your script is executable, if not, set it

chmod u+x /myscripts/

you can also redirect your script output to a file to check if it shows any errors

17 13 1-31 * 1-7    /myscripts/ &> /tmp/svn_backup_script.log

I guess your cron daemon is running

/etc/init.d/cron start
share|improve this answer

I think you should take a look on your environment variables, PATH and SHELL. You can define another default shell in this way. When I used crontab an OCSInventory script to run, it helped me.

share|improve this answer

Try not having ".sh" on the end of the script name, ISTR run-parts doesn't like it

share|improve this answer
This does matter for things using run-parts(8). It would be a problem if it were just a script being left in /etc/cron.daily for instance, but in this case it is fine. Regular crontab entries have nothing to do with run-parts – stew Sep 23 '12 at 12:09
thanks stew, i thought that might be the case, but "worth a try" ;) – Tom Newton Sep 23 '12 at 12:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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