Run a Cron Job Every 2 Hours
*/2 in the hour field with minute 0 fires at 00:00, 02:00, 04:00 … 22:00 — twelve times a day, on the even hours. The step starts from hour 0, which is why the runs land on even numbers.
0 */2 * * *In plain English: At minute 0, every 2 hours.
Field by field
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | 0 |
| Hour | */2 | every 2 hours |
| Day of month | * | every day |
| Month | * | every month |
| Day of week | * | every weekday |
Variations
0 1-23/2 * * *every 2 hours on the odd hours (01:00, 03:00 …)30 */2 * * *every 2 hours at half past (00:30, 02:30 …)0 8-18/2 * * *every 2 hours within the workday (08:00, 10:00 … 18:00)Tweak any of these in the crontab explainer to see the schedule in plain English and its next run times.
Frequently asked questions
Why does */2 run on even hours?
A step counts from the start of its range — hour 0. To shift to odd hours, give the range explicitly: 1-23/2.
Does 0 */2 * * * run at midnight?
Yes — hour 0 (midnight) is the first match of the step, so the daily cycle starts at 00:00.
Related schedules
New to cron syntax? Read Cron Expressions Explained, Field by Field.