Cron expression cheatsheet

This desk uses the standard five-field Vixie cron format: minute, hour, day of month, month, and day of week. There is no seconds field and no year field. Quartz tokens such as L, W, ?, and # are rejected.

Each field accepts a star (*), a number, a list (1,15,30), a range (1-5), a step (*/5 or 0-30/10), and, in month and weekday fields, English names (JAN–DEC, SUN–SAT). Names are case-insensitive. Day-of-week 7 is treated as Sunday, the same as 0.

Field ranges
Field Allowed values Names
Minute 0–590–59—
Hour 0–230–23—
Day of month 1–311–31—
Month 1–121–12JAN–DEC
Day of week 0–60–7 (7 = 0)SUN–SAT

Special characters

* means every value in the field. A comma starts a list. A hyphen starts a range. A slash starts a step: */15 in the minute field is 0, 15, 30, and 45. 1/15 starts at 1 and then adds 15 (1, 16, 31, 46).

If both day-of-month and day-of-week are restricted (neither field is a lone *), a date matches when either field matches. That is the Vixie union rule. If either field is *, the other field is required. 0 0 1 * 1 therefore runs at midnight on the 1st of the month or on every Monday, not only on a Monday that is the 1st.

Timezones and DST

Next-run times are computed with the IANA timezone you pick, using Intl.DateTimeFormat in this browser, including daylight-saving transitions. A local time that does not exist in spring-forward is skipped. A local time that occurs twice in fall-back is listed twice.

GitHub Actions schedule triggers and Cloudflare Workers cron triggers run in UTC, regardless of the preview timezone. Kubernetes CronJob can honor the timeZone field included in the snippet.

Back to the builder

Questions

Why is 7 accepted in the weekday field?

Vixie cron treats 7 as Sunday, the same as 0. This desk maps 7 to 0 after parsing so a list such as 0,7 is still only Sunday.

Does */1 count as a restricted field for the union rule?

The union rule looks at whether the raw field is a lone asterisk. */1 lists every value, but it is not *, so if the other day field is also restricted, union applies.