About cron expressions
What is cron?
Cron is a family of schedulers that start jobs at times described by an expression. The expression is a list of fields, each saying which values of that unit (minute, hour, day of the month, month, day of the week) match. When every field matches the current time, the scheduler starts the job. The original Unix cron lives in a crontab file, and the same idea appears in Kubernetes CronJobs, Quartz, Spring, AWS EventBridge and many CI services.
Cron describes when to start something. It does not describe what happens if the machine is off, whether the job succeeded, or whether the previous run has finished. Those behaviors belong to the scheduler and to your job, not to the expression.
What each field means
┌───────── minute (0-59) │ ┌─────── hour (0-23) │ │ ┌───── day of month (1-31) │ │ │ ┌─── month (1-12 or JAN-DEC) │ │ │ │ ┌─ day of week (0-7 or SUN-SAT; 0 and 7 are Sunday) * * * * *
Six-field formats put a seconds field first, and Quartz may add a year at the end. The breakdown table in the tool shows the real meaning and matching values of every field for the dialect you selected, including how its weekdays are numbered.
How ranges, lists and steps work
*means every value of the field.1,15is a list: the values 1 and 15.9-17is a range: 9 through 17, inclusive.*/20is a step over the whole field: in the minute field that is 0, 20 and 40.1-30/5is a step inside a range: 1, 6, 11, 16, 21, 26.1,5,10-20/2combines them: 1, 5, 10, 12, 14, 16, 18, 20.
Steps are anchored to calendar values, not to the previous run. */20 does not mean “20 minutes after the last execution”, and a step that does not divide the field evenly (such as */7 for minutes) restarts when the field wraps. Where a dialect accepts 0/15, it starts at the number before the slash and runs to the end of the field, while */15 starts at the field's first value; for fields that start at 0 those match, for day-of-month and month they do not.
Five-field and six-field cron
Standard five-field cron cannot schedule below one minute. Adding a seconds field gives the six-field layout used by Quartz, Spring and several libraries, so 0 */10 * * * * means every ten minutes at second zero. The same six tokens can be valid in more than one dialect with different weekday numbering or day rules, which is why you choose the dialect instead of the tool guessing. See Five-field vs. six-field cron expressions and Cron syntax explained.
- Unix cron (5 fields): macros such as
@dailyand@reboot; weekdays 0-7 with Sunday as 0 or 7. - Six-field with seconds (generic): seconds first; library behavior varies.
- Quartz: optional year,
?,L,W,#; weekdays 1-7 starting at Sunday. - Spring: six fields, weekdays 0-7,
L,W,#and macros. - Kubernetes CronJob: five fields and macros; the timezone is set in
.spec.timeZone. - AWS EventBridge:
cron(...)with six fields including a year, plus validation ofrate()expressions (not previewable).
Day of month and day of week
When you restrict both day fields, dialects disagree. In Unix cron and Kubernetes, a day matches if either the day-of-month or the day-of-week matches (unless one of them starts with *). Spring requires both. Quartz and EventBridge forbid setting both: one must be ?. So 0 0 13 * 5 runs on every 13th and every Friday in Unix cron, but only on Friday the 13th in Spring (0 0 0 13 * 5). The tool applies the rule of the dialect you selected and warns when switching dialect changes the upcoming run times. Read why day-of-month and day-of-week behave differently.
Timezones and daylight saving
A cron expression has no timezone of its own; the scheduler supplies one. The same expression read in two zones fires at two different UTC instants, so always check which zone your scheduler uses. On clock-change days a local time can be missing (spring forward) or repeated (fall back). The preview flags those dates and offers models for skipping or shifting, but the real behavior is up to your scheduler. For critical jobs, scheduling in UTC avoids the question. More in Cron and daylight-saving time.
What cron cannot express by itself
- Run after the previous run finishes, or skip if one is running. Use a lock, a job queue, or a scheduler concurrency setting such as Kubernetes
concurrencyPolicy. - Public holidays and the last business day of a month. Check a holiday calendar in the job, or use a scheduler with calendars.
- Exactly every 24 elapsed hours across daylight saving. Cron matches wall-clock times; use UTC or an interval-based scheduler.
- Retries, dependencies and catch-up after downtime. Add them in a workflow tool, systemd timers with
Persistent=true, or the job itself. - The last day of the month in Unix cron. Use a dialect with
L, or schedule days 28-31 and test the date in the job.
How to choose a dialect
Pick the one used by the system that will run the schedule: your crontab or a Kubernetes manifest (five fields), a Java Quartz trigger or a Spring @Scheduled annotation (six or seven fields), or an AWS EventBridge rule. If you are unsure, the compatibility table shows which profiles accept the expression as written, which need a conversion, and which would interpret it differently. Browse more DevOps tools.