cron.hourly

Hello guys,

I added a bash-script to /etc/cron.hourly but it doesn’t run at all (script is ok). I did a chmod +x on this script. How do i work this?

ps: i wrote (and tested) the script as root. I just did a crontab -l and got the message that there is no chrontab for root…

If you want to use a crontab, you need to create a crontab:

crontab -e

Select Nano as editor.

If the script executes by simply running:

/etc/cron.hourly/mycronjob

Then its working and will be executed every hour.

I worked it out by removing the “.sh” extension of the script. Cron doesn’t like a dot :slight_smile: