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
Other common schedules
-
Every minute
* * * * * -
Every 5 minutes
*/5 * * * * -
Every 10 minutes
*/10 * * * * -
Every 15 minutes
*/15 * * * * -
Every 30 minutes
*/30 * * * * -
Every 2 hours
0 */2 * * * -
Every day at midnight
0 0 * * * -
Every weekday
0 9 * * 1-5 -
Every week
0 0 * * 0 -
Every month
0 0 1 * * -
Every 2 minutes
*/2 * * * * -
Every 3 hours
0 */3 * * * -
Every 4 hours
0 */4 * * * -
Every 6 hours
0 */6 * * * -
Every 12 hours
0 */12 * * * -
Every day at noon
0 12 * * * -
Every year
0 0 1 1 *