Cron.hourly won't run

Entries in cron.hourly are run by the run-parts mechanism (man run-parts for more info). And run-parts is choosy about what filenames it considers valid.

For example, giving your script an extension will make it invalid and result in the job not being run. [a-zA-Z0-9_-] are the valid characters, so the '.' makes it invalid.

When adding a job to /etc/cron.hourly ( or .daily, .weekly, etc), always test afterwards that run-parts will actually run it by issuing the command:

run-parts --test /etc/cron.hourly

If by running this command it shows your file it means it worked. Otherwise, if doesn't show anything your file name is not valid.

What was the name of your script?


Why not using crontab ( /etc/crontab ) and use */1 in the hour field. I have used this to run a script every 5 min and it works well:

# m h dom mon dow user  command
* */1  * * *   user    command

Your problem is probably down to the overly open permissions, which allows anybody to edit your file. Try 755 instead.

Looking in the cron entries in your syslog output should confirm this.