How to read a cron expression
A cron expression is five space-separated fields that describe when a job runs. Each field accepts a single value (5), a list (1,15), a range (1-5), a step (*/10) or * for every value. Month and weekday fields also accept three-letter names such as JAN or MON.
Cron cheat sheet
| Expression | Meaning |
|---|---|
* * * * * | Every minute |
*/15 * * * * | Every 15 minutes |
0 * * * * | At the start of every hour |
0 0 * * * | Daily at midnight |
0 9 * * 1-5 | 09:00 Monday to Friday |
0 0 1 * * | Midnight on the 1st of each month |
0 0 1 1 * | Once a year on 1 January |
Tips for reliable scheduled jobs
- Avoid scheduling many jobs at exactly
0 0 * * *; spread them out to avoid load spikes. - GitHub Actions schedules can be delayed during busy periods, so do not rely on exact minutes.
- Make jobs idempotent so a retry or an overlapping run does not corrupt data.
- Log the start and end of every run and alert when a job has not succeeded within its window.