What is cron?
Cron is a scheduler traditionally used on Unix-like systems to run commands at calendar-based times. A crontab entry combines a schedule expression with a command, while hosted schedulers often reuse similar expression syntax for jobs or functions.
Cron is best for wall-clock schedules such as weekdays at 09:00. It is not always equivalent to an interval timer that waits a fixed duration from the previous run.
Standard five-field cron structure
minute hour day-of-month month day-of-weekExpression
0 9 * * 1-5Meaning
Weekdays at 09:00- Minute: 0–59
- Hour: 0–23
- Day of month: 1–31
- Month: 1–12
- Day of week: commonly 0–7, with Sunday represented by 0 or 7 depending on the implementation
Asterisks, ranges, lists, and steps
*matches every value.1-5matches an inclusive range.1,3,5matches a list of values.*/15advances through the field in steps of 15.
Combinations can be valid in some implementations, but support should be checked against the actual scheduler rather than assumed from another cron tool.
Common five-field cron examples
| Expression | Schedule |
|---|---|
*/5 * * * * | Every five minutes |
0 * * * * | At minute 0 of every hour |
0 0 * * * | Daily at midnight |
0 9 * * 1-5 | Weekdays at 09:00 |
0 0 1 * * | First day of each month at midnight |
Build and inspect these schedules with the Cron Expression Generator. Its preview uses your browser's local time zone and standard five-field numeric syntax.
Day-of-month and day-of-week semantics
When both fields contain restrictions, classic Vixie-style cron generally runs when either field matches. Other schedulers may differ or require a placeholder such as ?. To reduce ambiguity, prefer schedules that constrain one day field and leave the other as *.
A day such as the 31st simply does not occur in every month. Cron normally skips months without that calendar date rather than moving the job to the month's final day.
Cron time zones, DST, and syntax differences
The expression does not usually carry a time zone. Confirm the scheduler's configured zone, especially in containers and managed platforms. Daylight-saving changes can skip or repeat wall-clock times.
Quartz, AWS EventBridge, Spring, Jenkins, and other schedulers can add fields or special syntax. This guide covers standard five-field Unix-style cron only. For absolute instants rather than recurring schedules, read Unix Timestamp Explained.