Cron Expression
Explain a cron expression in plain English, see the next 10 run times in any time zone and build one from dropdowns. Handles 5 and 6 fields and @daily macros.
How to use Cron Expression
- 1Type or paste a cron expression, or choose one of the twelve presets.
- 2In Explain mode read the English sentence and the field table. In Next runs mode pick a time zone and a start time to see the next ten run times.
- 3In Build mode choose minute, hour, day, month and weekday from the dropdowns and copy the expression it writes.
What makes it better
- Understands 5-field and 6-field (with seconds) expressions and @yearly, @monthly, @weekly, @daily and @hourly macros
- Plain-English explanation, with an optional 24-hour clock, plus a field-by-field table
- Next 10 run times in any IANA time zone, from now or from a date and time you choose
- Validation that names the field and the allowed range when a value is wrong
- Three modes on one page: Explain, Next runs and Build
About Cron Expression
Paste a cron expression such as 0 9 * * 1-5 and this page explains it in English, breaks it down field by field and lists the next ten times it will run in a time zone you choose. It reads the standard five fields, six fields with a leading seconds field and macros such as @daily, and points to the field that is wrong when something does not validate. A small builder with dropdowns writes common schedules for you.
Common uses
- Check what a crontab line inherited from another team actually does before you change it.
- Confirm a nightly job set for 02:30 will run when you expect it to in the server's time zone.
- Build a weekday 09:00 schedule for a CI pipeline or a cloud scheduler without remembering the field order.
- Look at the next ten runs of a monthly job to see how a daylight-saving change moves it.
Example
Input
0 9 * * 1-5
Result
At 09:00 AM, Monday through Friday
Good to know
- Different schedulers read cron slightly differently. This page follows the common Unix style; Quartz extras such as a year field, #, W and some uses of L are not all supported.
- Run times are calculated in your browser with the time zone you pick. They show when the schedule is due, not when a particular scheduler will actually start the job.
- When both day of month and day of week are given, standard cron runs on either match. Some cloud schedulers require one to be ? or *.
Cron Expression FAQ
What are the five fields in a cron expression?
In order they are minute (0-59), hour (0-23), day of month (1-31), month (1-12 or JAN-DEC) and day of week (0-7 or SUN-SAT, where 0 and 7 both mean Sunday). An asterisk means every value, a comma separates a list, a dash makes a range and a slash adds a step, so */15 in the minute field means every 15 minutes.
How do I write a cron expression with seconds?
Add a sixth field at the start for seconds, giving second, minute, hour, day of month, month and day of week. For example */30 * * * * * runs every 30 seconds. Standard crontab files do not accept a seconds field, but many libraries and schedulers such as Quartz-style job runners and Spring do.
Why does my job run on days I did not expect?
When both the day-of-month and the day-of-week fields are restricted, classic cron runs the job when either one matches, not both. 0 9 1 * 1 runs at 09:00 on the 1st of every month and also on every Monday. Use * in one of the two fields, or check in code, if you need both to match.
What time zone does cron use?
The one the scheduler is set to, which on many servers is UTC and on cloud schedulers is often configurable. This page lets you choose any IANA time zone to see when the schedule falls in local time. During daylight-saving changes an hour can be skipped or repeated, so a job set for that hour may run late or twice.