Cron Expression Generator and Next-Run Calculator
Fill in the minute, hour, day of month, month and day of week, or start from a common schedule. You get the expression, a plain-English reading and the next five times it runs.
Last reviewed
Cron expression
*/15 9-17 * * 1-5
Runs every 15 minutes, during hour 09 to 17, on Monday to Friday.
- Minute: every 15 minutes
- Hour: during hour 09 to 17
- Day of month: every day of the month
- Month: every month
- Day of week: on Monday to Friday
Next runs
- Tue 10 November 2026 09:00
- Tue 10 November 2026 09:15
- Tue 10 November 2026 09:30
- Tue 10 November 2026 09:45
- Tue 10 November 2026 10:00
Times are clock times with no time zone, because cron uses the time zone of the machine it runs on. When both day of month and day of week are restricted, a day matching either one runs the job.
What a cron expression is
Cron is the scheduler built into Unix and Linux systems. A schedule is a line of five fields that say when to run a job:
┌───────── minute (0–59)
│ ┌─────── hour (0–23)
│ │ ┌───── day of the month (1–31)
│ │ │ ┌─── month (1–12)
│ │ │ │ ┌─ day of the week (0–6, Sunday is 0)
│ │ │ │ │
* * * * *
Type values into the five boxes, or start from a common schedule, and this page shows the expression, a plain-English reading, and the next five times it will run from a date and time you choose. It tells you at once if a field is invalid.
What each field can contain
The POSIX standard for crontab allows these in each field:
*for every value.- A number, such as
5. - A list separated by commas, such as
1,15,30. - A range with a hyphen, such as
9-17. A range is inclusive.
Most cron programs also accept some extensions, and this page supports them. The Linux crontab(5) manual (cronie) describes them:
- Steps: a range or
*followed by/and a number.*/15in the minute field means every 15 minutes, and0-23/2in the hour field means every second hour. - Names:
jantodecin the month field andsuntosatin the day-of-week field. - Sunday as 0 or 7 in the day-of-week field.
- Shortcuts:
@yearlyand@annually(0 0 1 1 *),@monthly(0 0 1 * *),@weekly(0 0 * * 0),@daily(0 0 * * *) and@hourly(0 * * * *).
@reboot runs once at start-up, so it has no repeating schedule to show.
The day-of-month and day-of-week rule
This is the rule that surprises most people. When both the day-of-month and the day-of-week fields are restricted, a day that matches either one runs the job. They are not combined with “and”. POSIX says it as: any day matching either the month and day of month, or the day of week, shall be matched.
The cronie manual gives this example: 30 4 1,15 * 5 runs at 4:30 on the 1st and 15th of each month and also every Friday. From 17 October 2026 its next runs are:
| Run | Date | Why |
|---|---|---|
| 1 | Friday 23 October 2026, 04:30 | a Friday |
| 2 | Friday 30 October 2026, 04:30 | a Friday |
| 3 | Sunday 1 November 2026, 04:30 | the 1st |
| 4 | Friday 6 November 2026, 04:30 | a Friday |
| 5 | Friday 13 November 2026, 04:30 | a Friday |
In cronie the either-matches rule applies only when neither field contains a *. If one of them starts with *, such as */2 for the day of the month, a day must match both. For example, 0 0 */2 * 1 runs only on Mondays that fall on an odd day of the month (the 1st, 3rd, 5th and so on). From 17 October 2026 those are Monday 19 October, 9 November, 23 November, 7 December and 21 December.
Worked examples
| Expression | Meaning | First run after Saturday 17 October 2026, 00:00 |
|---|---|---|
*/15 9-17 * * 1-5 |
every 15 minutes, hours 9 to 17, Monday to Friday | Monday 19 October, 09:00 |
0 9 * * 1-5 |
at 09:00 on weekdays | Monday 19 October, 09:00 |
0 0 1 * * |
midnight on the 1st of each month | Sunday 1 November, 00:00 |
0 0 * * 0 |
midnight every Sunday | Sunday 18 October, 00:00 |
0 0 29 2 * |
midnight on 29 February | Tuesday 29 February 2028, 00:00 |
0 0 30 2 * |
midnight on 30 February | never |
A Friday-evening example: with the business-hours schedule */15 9-17 * * 1-5, the last run on a Friday is at 17:45, and the next run is Monday at 09:00, since the weekend is skipped. Check the 29 February line: only leap years have one, so there can be years between runs.
Time zones and clock changes
Cron runs a job according to the clock and time zone of the machine it is on. This page shows clock times without a time zone and does not model daylight saving changes, so check how your system handles a time that is skipped or repeated when the clocks change.
Common mistakes
- Reading day-of-month and day-of-week as “and”. If both are restricted, either one matches.
- Using
*/5in the hour field when you mean minutes. The first field is the minute. - Thinking
*/7means weekly. It means 0, 7, 14, 21 and so on within the field, then restarts, so it is not every 7 minutes across the hour boundary. - Using 31 for a short month. A job set for the 31st does not run in months that do not have one.
- Forgetting the time zone of the machine that runs the job.
For other developer tools, see the UUID generator, the hash generator and the JWT decoder. To work out the days between dates, use the days between dates calculator.
How it works
Each field is read into the set of numbers it allows: a star becomes every value, a range becomes its numbers, and a step keeps every n-th one. To find the next runs, the page goes day by day from your start date, keeps the days whose month matches and whose day fields match under the rule above, and lists the matching hours and minutes in order, skipping any time before your start. It looks about ten years ahead.
Frequently asked questions
What are the five fields of a cron expression?
In order: minute (0-59), hour (0-23), day of the month (1-31), month (1-12) and day of the week (0-6, with Sunday as 0). A star means every value, so * * * * * runs every minute.
How do I run a job every 5 minutes?
Use */5 in the minute field and stars elsewhere: */5 * * * *. The */5 step is an extension to POSIX that cron programs such as cronie accept. It runs at minutes 0, 5, 10 and so on up to 55 of every hour.
What happens when I set both day of month and day of week?
If neither field starts with a star, the job runs on a day that matches either one. 30 4 1,15 * 5 runs at 04:30 on the 1st and 15th and on every Friday. If one starts with a star, a day must match both.
Is Sunday 0 or 7?
Both. POSIX defines 0 to 6 with Sunday as 0, and the cronie manual allows 0 or 7 for Sunday. The calculator accepts either, and also names such as sun and mon-fri.
Which time zone do the next runs use?
None is applied. Cron runs in the time zone of the machine it is on, so the times are shown as clock times, and the calculator does not model daylight saving changes.
Why does my schedule show no runs?
Because no day in the next ten years matches. For example 0 0 30 2 * is 30 February, which never exists. A job set for the 31st skips months with 30 days, and 29 February only comes in leap years.
Related calculators
- UUID GeneratorChoose version 4 (random) or version 7 (time-ordered) and how many to make.
- Hash GeneratorType or paste text and see its MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes at once, as hex or base64.
- JWT DecoderPaste a JSON Web Token.
- Days Until CalculatorPick the date you are counting down to.
- Day of the Week CalculatorPick a date and read its weekday, the day of the year, the ISO week and whether it is a leap year.
- Time ConverterEnter a time and choose the two units.
Sources
- The Open Group: POSIX crontab utility: the five fields, lists, ranges, and the either-matches rule for day of month and day of week
- crontab(5) from the cronie project: steps, names, 0 or 7 for Sunday, and the @yearly, @monthly, @weekly, @daily and @hourly shortcuts
- cronie source, cron.c: a day matches both day fields when either starts with a star, and either field when neither does