Every 2 Hours
Runs the job every 2 hours at the top of even-numbered hours (00:00, 02:00, 04:00, ..., 22:00). The 0 in the minute field ensures it runs at the start of the hour, and */2 in the hour field creates the 2-hour interval. This is useful for moderate-frequency tasks that do not need hourly execution.
0 */2 * * * What is the cron expression for Every 2 Hours?
The cron expression for Every 2 Hours is 0 */2 * * *. This five-field cron schedule uses the format minute, hour, day-of-month, month, and day-of-week. Runs the job every 2 hours at the top of even-numbered hours (00:00, 02:00, 04:00, ..., 22:00). The 0 in the minute field ensures it runs at the start of the hour, and */2 in the hour field creates the 2-hour interval. This is useful for moderate-frequency tasks that do not need hourly execution. Common use cases include database optimization and cdn cache purge.
Field Breakdown
Example Next Run Times
- 1.
2026-04-05 14:00 - 2.
2026-04-05 16:00 - 3.
2026-04-05 18:00 - 4.
2026-04-05 20:00 - 5.
2026-04-05 22:00
Common Use Cases
- ✓ Database optimization
- ✓ CDN cache purge
- ✓ Search index refresh
- ✓ Compliance report generation
Frequently Asked Questions
Does */2 run at even or odd hours?
*/2 starts from 0 and steps by 2, so it runs at 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22 — always even hours. For odd hours, use 1,3,5,7,9,11,13,15,17,19,21,23.
How many times does this run per day?
It runs 12 times per day — once every 2 hours.
Can I start the 2-hour cycle at a specific hour?
The */2 syntax always starts from 0. To start at hour 1, use 1,3,5,7,9,11,13,15,17,19,21,23 as an explicit list.