Cron Expression Generator

Edit cron expressions field by field across minute, hour, day, month and weekday. See plain-English and Chinese descriptions, the next five run times, and live range validation, all in your browser.

Five fields: minute, hour, day of month, month, weekday, separated by spaces. Edits here sync back to the field inputs below.

Presets

Click a preset to fill the expression box.

Commas, hyphen ranges and slash steps all work.

Steps like */2 or */6 are common; ranges may wrap, e.g. 22-2.

? means no limit, the same as *.

English names JAN through DEC are accepted.

0 and 7 both mean Sunday; MON-FRI equals 1-5.

How to use

  1. Type the full expression in the box: five space separated fields for minute, hour, day, month and weekday. Results refresh as you type.
  2. Or edit the five field inputs below. Quick chips next to each field insert stars, steps or ranges in one click.
  3. Use the presets to start from a typical schedule such as every minute or weekdays at 09:00, then adjust.
  4. The result panel shows the expression, a Chinese and an English description, plus the next five run times, all driven by the same parser.
  5. Invalid fields are reported with the exact reason, for example minute 61 being outside 0-59.

FAQ

Why do both dates trigger when day and weekday are both set?
Standard cron ORs the two restricted fields: the run happens if either the day of month or the weekday matches, like Linux crontab. To require both at once, filter the date inside your script. The page shows a note whenever this pattern appears.
Do 0 and 7 both mean Sunday in the weekday field?
Yes. 0 and 7 are equivalent, and SUN means Sunday too, while 1 through 6 are Monday through Saturday. MON-FRI equals 1-5, and names and numbers share the same parse path.
Why is the "next 5 runs" list sometimes empty?
The scan starts one minute after the current time and covers at most 1 year. If the combination can never match, such as February 30th, the list says so clearly instead of staying silent.
Is my expression uploaded to a server?
No. Parsing, description and run-time search all run locally in your browser, so the expression never leaves your device.

How to use

  1. Enter or pick an expression

    Type a five-field expression, or click a preset to fill a typical schedule. Results refresh on every keystroke, and the combined box stays in sync with the per-field inputs.

  2. Adjust each field

    The five inputs below map to minute, hour, day of month, month and weekday. Quick chips insert stars, steps or ranges, and invalid input reports the exact field and reason.

  3. Read the plain description

    The result panel shows the expression, a Chinese and an English description, plus the next five run times. Both texts come from the same parser, so they never disagree.

  4. Check upcoming runs

    The search starts one minute after the current time and covers up to one year. When both day fields are restricted, the page notes that cron runs on their union.

About this tool

Cron expressions describe recurring schedules with five fields: minute, hour, day of month, month and day of week. A field can be a star for any value, a number, a comma separated list, a hyphen range, or a range with a slash step. The expression 30 8 * * 1-5 runs at 08:30 from Monday through Friday. The expression 0 0 1 * * runs at midnight on the first day of each month. This tool splits the five fields into separate inputs, adds presets and quick chips, and explains every result in plain words.

Description and schedule math share one parser. The tool first resolves every field into the set of allowed values. It then builds the description from those sets and scans minute by minute for upcoming runs. The scan starts one minute after the current time and stops after five matches or one year. When both day fields are restricted, the standard cron rule applies: a date matching either one runs. Everything happens locally in the browser.

How it works

Each field has its own range: minutes 0 to 59, hours 0 to 23, days 1 to 31, months 1 to 12. Weekdays run from 0 to 7, and both 0 and 7 mean Sunday. The parser splits a field on commas, then reads each item as a star, a range or a single value. An optional step is applied, and everything merges into one set of allowed values. Ranges may wrap, so the hour range 22-2 covers 22, 23, 0, 1 and 2. Months and weekdays accept English names, so JAN is January and MON is Monday. A field whose set ends up empty can never match. The tool reports that as an error.

The run-time search walks forward one minute at a time from the next whole minute after now. A candidate passes when its minute, hour and month fall inside the matching sets, and its date satisfies the day rule described above. The walk stops after five matches or after one year has passed. Some expressions can never fire, such as February 30th, and the page says so instead of showing an empty list silently. The minute-level scan mirrors how real cron daemons wake up every minute, so month lengths and leap years need no special handling.

When to use it

  1. Decode existing crontabs

    Paste a line from a server crontab you did not write and read the plain description first. The next five run times show whether the schedule lands where the team expects. That catches mistakes before a cleanup script runs at the wrong hour.

  2. Reschedule with confidence

    Changing a daily job to weekdays only means keeping the minute and hour fields and setting the weekday field to 1-5. The description and the run list refresh together, so the effect of the edit is visible immediately, no re-testing on a server required.

  3. Debug missing runs

    When a job never seems to fire, check each field range first, then look at the run list. A date like February 30th matches nothing within a year, and the page reports that clearly instead of failing quietly or running the job late.

Tips & tricks

  • Weekday 0 and 7 both mean Sunday; 1 through 6 are Monday through Saturday, and MON-FRI equals 1-5.
  • A step follows a star or a range: */5 means every 5 minutes, and 10-30/10 means every 10 minutes from minute 10 through 30.
  • Before copying an expression, compare the description with the next run list. Both come from the same parser, so agreement means the parse matches your intent.

Things to watch

  • Do not stack day and weekday

    Restricting both fields makes cron run on their union. The expression 0 0 1 * 1 fires every Monday and on the first of each month. To require the first of the month AND Monday at once, filter the actual date inside your script before running the job.

  • Watch wrapped ranges

    The hour range 22-2 runs from 22:00 through 02:59 and covers five hours across midnight. If you meant an empty set or wanted ascending order, write a comma list instead so that readers are not misled about the real coverage.

  • Empty results are answers

    The search covers one year from the current minute, and it starts one minute after now. A day field of 31 combined with months that lack a 31st yields no runs at all. That is the correct reading of the expression, not a tool failure.

Related Tools