Cron Expression for Every Hour
The cron expression for every hour is 0 * * * *: it runs at minute 0 of every hour, 24 times a day. The @hourly shorthand means exactly the same thing.
At 00 past the hour.
0 * * * *Standard 5-field crontab syntax. Day of month and day of week are OR'd when both are set.
What it does
The key is the 0 in the minute field. A cron job runs whenever all five fields match the current time, so 0 * * * * matches only when the minute is 0 — once per hour. Leaving the minute as * is a classic mistake: * * * * * matches every minute of every hour, which runs the job 60 times more often than intended.
Hourly jobs are the backbone of routine maintenance: rotating or compressing logs, recalculating leaderboards and aggregates, expiring stale sessions, syncing a CRM, or producing an hourly usage report. An hour is short enough that data rarely feels out of date and long enough that even a slow job finishes well before the next run.
Minute 0 is the most crowded minute on any shared system — every hourly job wants it. Nothing says an hourly job has to run on the hour, so pick an arbitrary minute such as 17 * * * *. It still runs once an hour, but it won't compete for CPU, database connections or API quota with everything else scheduled at :00.
How 0 * * * * works, field by field
| FIELD | VALUE | MEANING |
|---|---|---|
| Minute | 0 | minute 0 |
| Hour | * | every hour |
| Day of month | * | every day of the month |
| Month | * | every month |
| Day of week | * | every day of the week |
Put together, cron reads 0 * * * * as: “At 00 past the hour.”
To see further ahead, paste the expression into the cron calculator, which lists the next ten run times and counts how many times the schedule runs in a year.
Frequently asked questions
Does 0 * * * * run at :00 or an hour after I deploy it?
At :00. Cron compares each field with the current clock time, so the job runs at the top of every hour no matter when the crontab was installed. Deploy it at 10:40 and the first run is at 11:00.
Is @hourly the same as 0 * * * *?
Yes. @hourly is a shorthand that cron expands to 0 * * * *. Vixie cron, cronie and most modern schedulers support it, but the five-field form is more portable.
How do I run a job every hour between 9am and 5pm?
Restrict the hour field to a range: 0 9-17 * * * runs at 9:00, 10:00 and so on up to 17:00 — nine runs a day. Add 1-5 in the day of week field to skip weekends.