Cron Every 2 Hours on Weekdays
Schedule a cron job every 2 hours on weekdays using 0 */2 * * 1-5. Complete field-by-field breakdown for weekday-only periodic interval scheduling.
Cron Expression
0 */2 * * 1-5
Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At 0 |
| Hour | */2 | Every 2nd hour |
| Day of Month | * | Every day of the month (1–31) |
| Month | * | Every month (1–12) |
| Day of Week | 1-5 | From Monday to Friday |
Detailed Explanation
The cron expression 0 */2 * * 1-5 schedules a task to run every 2 hours on weekdays (Monday through Friday) only.
Field-by-field breakdown:
0(Minute): At minute 0. The task fires at the top of each qualifying hour.*/2(Hour): Every 2nd hour, starting from hour 0. The step value/2triggers at hours 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, and 22.*(Day of Month): Every day from 1 through 31. No restriction on the day of the month.*(Month): Every month from January through December. No restriction on which month.1-5(Day of Week): Monday through Friday. The range covers all five business days, excluding Saturday and Sunday.
This means your task will execute 12 times per weekday (every 2 hours around the clock), for a total of 60 executions per work week. Unlike business-hours-only schedules, this pattern runs throughout the entire 24-hour period on weekdays, providing continuous monitoring during the work week while giving systems a break on weekends. The 2-hour interval strikes a balance between frequent polling and resource conservation. This is suitable for tasks that need regular weekday updates but can pause on weekends. This expression is supported by standard cron on Linux/macOS, as well as cloud services like AWS CloudWatch, Google Cloud Scheduler, and GitHub Actions.
Use Case
Great for polling a third-party API for updated product catalog data every 2 hours on business days, keeping your e-commerce listings synchronized.
Try It — Interactive Builder
at min 0, every 2h, on DOW 1-5
Next 10 Executions
Ctrl+Shift+C to copy expression