0
0,35 * * * *  /home/scripts/backup.sh "daily backup"

what is wrong with my cron tab line it isn't working I didn't try @daily yet but wanted to make sure it is running so am running it at 0 minutes on the hour and at 35 mintues every hour.

I don't need to restart the server do I ?

quanta
  • 52,423
landed
  • 173

3 Answers3

2

First make sure you the cron is being executed on time. This can be done by checking /var/log/cron. You must see execution every 0th and 30th min.

tail -f /var/log/cron

If cron is attempting the execution on time and the script isn't running yet then probably it is permission issue. Grant execute permission to the user for which you are running cron. If not sure about user thing, just gran execute to all:

chmod a+x /home/scripts/backup.sh
0

You don't need to restart the Server. As long as the cron daemon is running it should be ok.

are you sure the script is executable by the user the cronjob is running as? To mark it executable, do this chmod a+x /home/scripts/backup.sh

replay
  • 3,310
0

Make sure you modified the crontab file correctly.

The correct way to edit the crontab is to run crontab -e. And the correct way to verify its content is with crontab -l.

If you modified /etc/crontab, then you may need to restart the cron service (depending on your cron version). And you need to put the username before the command. Like this:

0,35 * * * * root /home/scripts/backup.sh "daily backup"

And of course, if you are using some odd cron daemon, what I said may not be true.

chutz
  • 8,300