Cron Every 5 Minutes During the First Hour (Midnight-1 AM)
Schedule a cron job every 5 minutes during the midnight hour using */5 0 * * *. Field-by-field breakdown for time-windowed interval scheduling.
Cron Expression
*/5 0 * * *
Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | */5 | Every 5th minute |
| Hour | 0 | At 0 |
| Day of Month | * | Every day of the month (1–31) |
| Month | * | Every month (1–12) |
| Day of Week | * | Every day of the week (Sun–Sat) |
Detailed Explanation
The cron expression */5 0 * * * schedules a task to run every 5 minutes, but only during the midnight hour (12:00 AM to 12:55 AM), every day.
Field-by-field breakdown:
*/5(Minute): Every 5th minute, starting from minute 0. The step value/5triggers at minutes 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, and 55.0(Hour): At hour 0 (midnight) only. This restricts all executions to the first hour of the day.*(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.*(Day of Week): Every day of the week from Sunday through Saturday. No restriction on the day.
This means your task will execute 12 times per day, all concentrated within the midnight hour. This pattern is useful for intensive monitoring or processing that should only happen during a specific time window. For example, you might want frequent checks during the day-boundary transition when log rotation, data partitioning, and batch job cascades are occurring. After the critical midnight hour passes, the frequent polling stops, conserving resources for the rest of the day. This is more efficient than running every 5 minutes around the clock when only the midnight window matters. 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
Useful for intensive monitoring of data pipeline health during the midnight batch processing window, catching failures quickly during the critical ETL period.
Try It — Interactive Builder
every 5 min, at hour 0
Next 10 Executions
Ctrl+Shift+C to copy expression