Cron Every 2 Hours
The */2 in the hour field means "every 2nd hour." Combined with 0 in the minute field, this runs at 12:00 AM, 2:00 AM, 4:00 AM, and so on — 12 times per day.
Cron Expression
0 */2 * * *Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At minute 0 |
| Hour | */2 | Every 2nd hour (0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22) |
| Day of Month | * | Every day (1-31) |
| Month | * | Every month (1-12) |
| Day of Week | * | Every day of the week (0-6) |
Variations
0 */2 * * *Every 2 hours at :00 (even hours)0 1/2 * * *Every 2 hours starting at 1 AM (odd hours)30 */2 * * *Every 2 hours at :30Common Use Cases
- Periodic data warehouse ETL jobs
- Social media content scheduling checks
- Server resource usage reports
- Stale session cleanup
Tips & Best Practices
*/2 starts at hour 0. Use 1/2 to start at hour 1 (1, 3, 5, 7...).
12 executions per day is very manageable for most workloads.