Cron Syntax Guide: How Cron Expressions Work
Cron expressions schedule recurring jobs on Unix systems, in CI/CD pipelines (GitHub Actions, GitLab CI), and in task schedulers like Kubernetes CronJobs. They look cryptic but follow a fixed, learnable pattern.
The five fields
| Field | Allowed values |
|---|---|
| Minute | 0-59 |
| Hour | 0-23 |
| Day of month | 1-31 |
| Month | 1-12 |
| Day of week | 0-6 (0 = Sunday) |
Read left to right: minute hour day-of-month month day-of-week.
Special characters
| Symbol | Meaning |
|---|---|
* | Every value (no restriction) |
, | A list, e.g. 1,15 means the 1st and 15th |
- | A range, e.g. 1-5 means Monday through Friday |
/ | A step, e.g. */15 means every 15 units |
Common examples
| Expression | Meaning |
|---|---|
0 9 * * 1-5 | 9:00 AM, Monday through Friday |
*/15 * * * * | Every 15 minutes |
0 0 1 * * | Midnight on the 1st of every month |
0 0 * * 0 | Midnight every Sunday |
0 */6 * * * | Every 6 hours, on the hour |
Common gotcha: time zones
Cron itself has no concept of time zones — it runs in whatever time zone the host system (or CI runner) is configured for. Always check your platform's docs; GitHub Actions, for example, runs scheduled workflows in UTC regardless of your repo's location.
Try it yourself
Use the Cron Expression Builder to build a schedule with dropdowns, or paste in an existing expression to get a plain-English explanation.