Cron expression for every hour
0 * * * * runs a job once an hour, at the start of every hour. The shortcut @hourly means exactly the same thing.
Runs entirely in your browser. Nothing you paste is sent to our server, stored or logged.
0 * * * *
When it runs next
What it means
The minute is fixed at 0 and every other field is an asterisk, so the job runs at 0:00, 1:00, 2:00 and on through 23:00, 24 times a day. A classic slip is to set the hour and leave the minute as an asterisk: * 5 * * * runs every minute for the whole of the five o'clock hour instead of once.
The minute does not have to be zero. 17 * * * * also runs hourly, at 17 minutes past, and picking an unusual minute keeps your job away from the crowd at the top of the hour.
Common variations
| Expression | Runs |
|---|---|
0 9-17 * * * | Every hour from 9:00 to 17:00 |
30 * * * * | Every hour at half past |
0 * * * 1-5 | Every hour on weekdays only |
As a crontab line
Add the command you want to run after the five fields, then save it with
crontab -e:
0 * * * * /path/to/script.sh