Codepackr / utilities / Cron Expression Builder

Cron Expression Builder

Build, validate, and understand standard 5-part cron schedules with human explanations.

Client-Side Execution & Privacy Guarantee

This utility executes 100% locally in your web browser. Your inputs, tokens, queries, and data payloads are never transmitted to any external server or backend.

A cron expression is a compact five-field string that tells a scheduler when a job should run. The fields, from left to right, are minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-7, where both 0 and 7 mean Sunday). The expression is evaluated in the server’s local time zone or in UTC, depending on the scheduler configuration.

This tool accepts a standard five-part expression, validates each field, expands ranges and steps, and produces a human-readable summary together with the next few execution times. It also offers a form-based builder so you can assemble an expression without memorizing the syntax. Everything runs in the browser.

Field order and allowed values

The five fields must appear in fixed order and are separated by single spaces. Minute accepts 0-59, hour 0-23, day-of-month 1-31, month 1-12 (or the abbreviations JAN-DEC), and day-of-week 0-7 (or SUN-SAT). Using 7 for Sunday is permitted for compatibility with older implementations.

An asterisk (*) matches every legal value in that field. A comma creates a list, a hyphen creates an inclusive range, and a slash introduces a step. For example, 0-30/10 in the minute field means 0, 10, 20 and 30. The tool expands these constructs so you can verify the resulting set of values.

Day-of-month versus day-of-week

When both the day-of-month and day-of-week fields contain a non-asterisk value, most cron implementations treat the condition as a logical OR: the job runs if either field matches. The expression 0 0 13 * 5 therefore fires on the 13th of every month and also on every Friday, not only on Friday the 13th.

If you need both conditions to be true simultaneously you must leave one field as an asterisk and enforce the second constraint inside the command itself, for example by testing the day of the week with the date utility. The builder highlights this classic pitfall when it detects both fields restricted.

Common special characters and next-run calculation

The characters *, ,, - and / are the only ones required for the vast majority of schedules. Some extended dialects also support L (last), W (weekday) and # (nth weekday), but this tool focuses on the portable five-field syntax understood by Vixie cron, systemd timers, Kubernetes CronJobs and most cloud schedulers.

After validating an expression the tool computes the next several matching timestamps by walking forward from the current moment. This preview lets you confirm that “every 15 minutes during business hours on weekdays” really produces the times you expect before you paste the expression into a crontab or CI configuration.

When to use this tool

  • Writing a new crontab entry or Kubernetes CronJob and wanting an immediate plain-English confirmation
  • Debugging why a scheduled job did not run by expanding the expression and inspecting the next times
  • Teaching or documenting a schedule for colleagues who do not remember the field order
  • Converting a natural-language requirement (“weekdays at 9:30”) into a correct expression
  • Checking whether an existing expression accidentally uses the day-of-month/day-of-week OR semantics

How to use the Cron Expression Builder

  1. Type or paste a five-field expression into the input box, or start from the visual builder.
  2. The validator immediately reports any out-of-range numbers or illegal characters.
  3. A human-readable sentence appears below the expression, describing exactly when the job will run.
  4. Expand the “next runs” section to see the following five or ten matching times in your local zone.
  5. Adjust individual fields with the builder controls; the expression string updates live.
  6. Copy the finished expression for use in crontab, GitHub Actions, or any other scheduler that accepts standard cron syntax.
  7. If the next-run times look wrong, verify the time zone assumed by the target scheduler.

Worked examples

Every five minutes

Input
*/5 * * * *
Output
At every 5th minute.

Fires at minutes 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 and 55 of every hour.

Weekdays at 09:00

Input
0 9 * * 1-5
Output
At 09:00 on every day-of-week from Monday through Friday.

Does not run on Saturday or Sunday. Equivalent to 0 9 * * MON-FRI.

Common mistakes and tips

  • Always test the expression against the next-run preview before deploying. A single misplaced asterisk can turn a daily job into a per-minute job.
  • Remember that day-of-month and day-of-week are OR-ed. Use an asterisk in one of them unless you deliberately want the union of both sets.
  • Month and day-of-week names (JAN, MON, etc.) are accepted by most implementations and improve readability.
  • The tool assumes the five-field POSIX form. Six-field expressions that include seconds are rejected; strip the leading seconds field if your scheduler requires it.
  • Schedulers differ on whether the expression is evaluated in UTC or local time. Confirm the convention of your target system.

Frequently asked questions

Why does 0 0 13 * 5 not mean Friday the 13th?

When both day-of-month and day-of-week are restricted, cron runs the job if either matches. The expression fires on every 13th and on every Friday.

Does the tool support the L or # extensions?

No. It implements only the portable *, comma, hyphen and slash syntax so the generated expressions work with the widest range of schedulers.

How does the next-run calculation work?

The validator expands every field into a set of allowed values, then walks forward minute by minute from the present until it finds the requested number of matches.

Can I use 7 for Sunday?

Yes. Both 0 and 7 are accepted as Sunday, matching the majority of Unix cron implementations.

Is any data sent to a server?

No. Validation, expansion and next-run calculation all occur inside the browser.