Skip to content

Cron Expression Generator

Build, explain, and preview a cron schedule.

Whitespace-separated fields. Use *, a-b, */n, and lists like 1,15.

Status

Valid expression
Description
at minute 0, past hour 9, on Monday, Tuesday, Wednesday, Thursday, Friday
Next run
Fri, Jul 24, 2026, 09:00:00 AM

Next run is computed in your device's local time, stepping forward from now.

How the cron expression generator works

A cron expression is a list of space-separated fields, one per time unit. The generator splits your expression into fields, then expands each field into the exact set of integer values it matches. A field can be a wildcard * (every value in range), a single number, a range a-b, a step */n or a-b/n (every nth value), or a comma-separated list of these. Each value is checked against its field’s natural bounds: minute 0-59, hour 0-23, day-of-month 1-31, month 1-12, day-of-week 0-7, and seconds 0-59 for Quartz.

To find the next run, the tool starts at the moment after your chosen “from” time and steps forward one minute at a time (one second for Quartz). At each step it tests whether that timestamp’s minute, hour, month, and day all fall in the matching sets. The day check applies the Vixie union rule: if both day-of-month and day-of-week are restricted, a match needs only one of them; if just one is restricted, only that field constrains the day. The first timestamp that satisfies every field is the next run.

Worked example

Take the schedule 0 9 * * 1-5 (every weekday at 9:00 AM) in the 5-field Vixie format, searching from Wednesday, 24 June 2026 at 08:30.

The fields expand to:

Field Value Matches
minute 0 minute 0
hour 9 9 AM
day-of-month * any day
month * any month
day-of-week 1-5 Mon, Tue, Wed, Thu, Fri

The search begins at 08:31 and steps forward minute by minute. The next timestamp with minute 0 and hour 9 is 09:00 on the same day. June 24, 2026 is a Wednesday, which is inside the Monday-to-Friday set, so the day check passes. The next run is 2026-06-24 09:00. Had the start been a Saturday, the step search would have skipped past the weekend and landed on the following Monday at 09:00.

How to use it

  • Choose the dialect first: 5-field Vixie for standard crontab, or 6-field Quartz when your scheduler needs a seconds field.
  • Type each field, or use a wildcard * for “every”. Combine pieces with commas, for example 0,30 for the top and half of each hour.
  • Use steps for regular intervals: */15 in the minute field means every 15 minutes, 0 */2 * * * means every two hours on the hour.
  • Read the plain-English description to confirm the schedule means what you intend before deploying it.
  • Check the next run time against a known good case, especially when you mix day-of-month and day-of-week.

Limitations

The generator covers the core cron grammar: wildcards, single values, ranges, steps, and lists. It does not parse extended syntax that some schedulers add, such as L (last day), W (nearest weekday), # (nth weekday), ?, or three-letter month and day names like JAN or MON. Next-run times are computed in local wall-clock time and inherit whatever daylight-saving behavior your system clock has, so a job scheduled inside a skipped hour may not fire on that day. The four-year search bound means a valid but never-matching expression returns no next run rather than an error. This is a scheduling aid, not a guarantee of how a specific cron daemon on a specific host will behave; always confirm against your production scheduler’s own documentation.

Frequently asked questions

What is the difference between the 5-field and 6-field formats?

The 5-field Vixie format is the classic Unix crontab layout: minute, hour, day-of-month, month, day-of-week. The 6-field Quartz format adds a leading seconds field, so it can match a specific second within a minute. Pick Quartz only if your scheduler supports it, such as the Quartz Java library; standard cron daemons expect 5 fields.

Do 0 and 7 both mean Sunday in the day-of-week field?

Yes. In Vixie cron the day-of-week range is 0 to 7, where both 0 and 7 represent Sunday. The generator normalizes 7 to 0 internally, so `0 0 * * 7` and `0 0 * * 0` describe the same schedule. Monday is 1 and Saturday is 6.

Why does my expression with both a day-of-month and a weekday run more often than expected?

When both the day-of-month and day-of-week fields are restricted (neither is `*`), Vixie cron treats them as a union, not an intersection. A timestamp matches if it satisfies either field. So `0 0 13 * 5` fires on the 13th of every month AND on every Friday, not only on Friday the 13th.

Does the next run time account for daylight saving time?

The next run is computed in your local wall-clock time by stepping forward and testing each candidate minute. Across a spring-forward or fall-back transition, a local minute is skipped or repeated exactly as your system clock skips or repeats it. The tool does not reason about UTC offsets directly.

What happens if I write an impossible schedule like February 30?

The expression still validates because 30 is a legal day-of-month value, but no calendar date ever matches `* * 30 2 *`. The next-run search is bounded to roughly four years, so instead of looping forever it returns no result, signalling that the schedule can never fire.