Skip to content

Cron Expression Builder & Explainer

Parse, validate and explain a 5-field cron expression in plain English, and preview the next run times in UTC. Runs entirely in your browser.

Runs entirely in your browser. Nothing you paste here is sent to us or anyone else โ€” there is no server processing, no logging of input, and no third-party scripts on this page.

A cron expression is five space-separated fields โ€” minute, hour, day-of-month, month and day-of-week โ€” that tell a scheduler exactly when to run a job. The tool above parses your expression, validates each field on its own, translates it into a plain-English sentence, and previews the next five run times in UTC. Everything happens in your browser; nothing you type is uploaded.

What is cron?

Cron is the time-based job scheduler built into Unix-like systems. You give it a schedule and a command, and it runs that command automatically whenever the current time matches the schedule. The schedule itself is written as a compact string called a cron expression, most commonly stored in a crontab file. Cron powers backups, log rotation, report generation, cache warming, and countless other recurring tasks.

The five fields, in order

A standard cron expression has exactly five fields, always in this order:

Field Allowed values Meaning
minute 0-59 Minute of the hour
hour 0-23 Hour of the day (24-hour clock)
day-of-month 1-31 Day of the month
month 1-12 Month of the year
day-of-week 0-6 Weekday, where 0 is Sunday

So 0 9 * * 1-5 reads field by field as: minute 0, hour 9, any day-of-month, any month, day-of-week Monday through Friday โ€” in other words, at 09:00 on weekdays.

The special characters

  • Asterisk * โ€” every value the field allows. In the minute field it means every minute; in the month field, every month.
  • Step */n โ€” every nth value. */15 in the minute field means minute 0, 15, 30 and 45. A step can also follow a range, as in 0-30/10.
  • Range a-b โ€” an inclusive span. 1-5 in day-of-week means Monday through Friday.
  • List a,b,c โ€” several specific values. 0,30 in the minute field means on the hour and on the half hour.

These combine freely. 0,15,30,45 9-17 * * 1-5 means every 15 minutes between 9am and 5pm on weekdays.

A worked example

Take 30 2 1 * *. Minute 30, hour 2, day-of-month 1, any month, any day-of-week. That is “at 02:30 on the 1st of every month” โ€” a classic monthly maintenance window. Change the day-of-month to */2 and it becomes every second day at 02:30. The builder above shows this translation and the concrete next dates so you can confirm the schedule before you trust it.

The day-of-month / day-of-week gotcha

This trips up almost everyone. When you restrict both the day-of-month and the day-of-week fields (neither is *), classic cron does not require both to match โ€” it fires when either matches. So 0 0 13 * 5 does not mean “midnight on Friday the 13th”; it means “midnight on the 13th of any month, and also midnight on every Friday”. If you need a true AND, restrict only one field and filter the other inside your script. Whenever both day fields are set, the tool above adds an explicit note reminding you of this OR behaviour.

Common use cases and errors

  • Every 15 minutes: */15 * * * * โ€” a frequent health-check or polling cadence.
  • Daily at midnight: 0 0 * * * โ€” nightly jobs and rollovers.
  • Weekdays at 9am: 0 9 * * 1-5 โ€” business-hours reports.
  • Out-of-range values: an hour of 24 or a month of 0 is invalid; hours stop at 23 and months start at 1.
  • Too many fields: some systems add a leading seconds field or a trailing command. The classic format is exactly five time fields โ€” anything else is rejected here.

A note on timezones

The run-time preview is calculated in UTC so the result is unambiguous no matter where you are. Real cron daemons, however, evaluate schedules in the server’s local timezone, which may observe daylight saving. Before you rely on a schedule, convert the UTC preview to your server zone and remember that jobs pinned to a clock time can run twice or be skipped on the days the clocks change.

Runs entirely in your browser

This builder never sends your expression anywhere. The parser, the English translator and the next-run scanner are all plain JavaScript executing on your device, so you can test schedules โ€” including ones that reference internal job names in a command you keep elsewhere โ€” without any data leaving your machine.

Frequently asked questions

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) and day-of-week (0-6, where 0 is Sunday). Five values separated by spaces describe when a job should run.

What do the special characters mean?

An asterisk (*) means every value. A slash sets a step, so */15 means every 15th value. A hyphen sets a range like 1-5. A comma builds a list like 1,15,30. You can combine them, for example 0-30/10.

Why can day-of-month and day-of-week behave unexpectedly together?

When BOTH fields are restricted (neither is *), most cron implementations treat them as OR, not AND. The job runs if the date matches the day-of-month OR the day-of-week. So 0 0 13 * 5 fires on the 13th and on every Friday, not only on Friday the 13th.

Are the next run times shown in my local time?

No. The preview computes and displays run times in UTC (Coordinated Universal Time). Real cron daemons use the server timezone, so convert from UTC to your server zone before relying on the schedule.

Does this validate each field separately?

Yes. Every field is parsed and range-checked on its own, so if the hour is 25 or the month is 0 you get a specific error naming the field rather than a single vague failure.

Is my cron expression sent to a server?

No. Parsing, translation and the run-time preview all happen in your browser with plain JavaScript. Nothing you type is uploaded, logged, or stored.

How far ahead does the run preview look?

It scans forward minute by minute from the current time up to a capped window of roughly 2.85 years. If a schedule is impossible โ€” such as a day-of-month that never occurs in the chosen month โ€” it reports that no run was found instead of looping forever.

Does this support seconds or non-standard extensions?

No. It targets the classic 5-field format used by Vixie cron and crontab. It does not parse a leading seconds field, named months like JAN, or macros like @daily. Use the numeric 5-field syntax.