How a cron expression is built
Cron is the time-based job scheduler found on Linux, macOS and most Unix systems, and its syntax is reused by GitHub Actions, Kubernetes CronJobs, many cloud schedulers and job libraries. A standard cron expression has five fields separated by spaces: minute (0–59), hour (0–23), day of month (1–31), month (1–12 or JAN–DEC) and day of week (0–6 or SUN–SAT, where 7 also means Sunday). The job runs at every minute where all the fields match. So 0 9 * * 1-5 means minute 0 of hour 9, any day of the month, any month, Monday through Friday: 9:00 AM on weekdays.
Special characters
- * (asterisk): every value.
*in the hour field means every hour. - , (comma): a list.
0,30in the minute field runs at :00 and :30. - - (hyphen): a range.
9-17in the hour field covers 9 AM through 5 PM. - / (slash): a step.
*/15in the minute field means every 15 minutes;10-50/20means 10, 30 and 50. - Shortcuts:
@hourly,@daily(or@midnight),@weekly,@monthlyand@yearly(or@annually) are accepted and expanded to their five-field form.
The day-of-month and day-of-week rule
One cron rule surprises almost everyone. When both day fields are restricted, for example 0 0 1 * MON, the job runs when either one matches: on the 1st of every month and on every Monday. When one of them is *, only the other one counts. This tool follows that classic Vixie cron behavior in both the explanation and the run-time preview, and says “or” in the description so the result is not a surprise in production.
How the next run times are calculated
The preview does not guess. It parses each field into the exact set of allowed values, then walks forward minute by minute through matching days from the current time and lists the first five times that fit. Times are shown in your browser’s time zone, while a real server uses its own, often UTC, so adjust the hour if the two differ. On days when clocks change for daylight saving time, a time that does not exist locally is skipped. If an expression can never fire, such as February 30, the tool says so instead of showing nothing. Seconds and year fields from Quartz or Spring schedulers are not part of standard cron and are reported as errors. Need to tidy a config file next? Try the JSON formatter or encode a secret with the Base64 encoder.