Cron Expression Builder

The Complete Cron Expression Guide

The 5-field cron format explained field by field, wildcard/list/range/step syntax, the day-of-month vs day-of-week OR rule, and common mistakes.

Open Cron Builder

The 5 Cron Fields

A standard cron expression is five space-separated fields, always in this order: minute hour day-of-month month day-of-week. Every field must be present - a 4-field or 6-field expression is not standard cron and this tool will reject it with a clear error naming how many fields it found.

Each field independently describes which values of that unit are allowed to trigger a run. A run only happens at a moment where every field's condition is satisfied simultaneously (with one deliberate exception for day-of-month/day-of-week, covered below).

Syntax Reference

SyntaxMeaningExample
*Every possible value of this field* in hour = every hour
5Exactly this one value5 in minute = only at :05
1,15,30A comma-separated list of specific valuesRuns at minute 1, 15, and 30
9-17An inclusive range of valuesHour 9 through 17 (9am-5pm)
*/15A step applied across the field's whole rangeMinute */15 = 0, 15, 30, 45
9-17/2A step applied within a specific rangeHour 9, 11, 13, 15, 17
1-5,0Ranges and lists can be combined with commasDay-of-week: weekdays plus Sunday

Day-of-Month vs Day-of-Week: the OR Rule

This is the single most misunderstood part of cron syntax. Normally every field must match (an implicit AND). But when both the day-of-month field and the day-of-week field are restricted in the same expression (neither one is *), cron switches to OR logic for just those two fields: a date matches if it satisfies either one.

For example, 0 9 1 * 1 (day-of-month = 1, day-of-week = Monday) does not mean "the first Monday of the month" - it means "the 1st of every month, or every Monday", whichever comes first for each candidate date. If you only restrict one of the two fields and leave the other as *, this OR behavior never kicks in - the wildcard field simply matches everything, so only the restricted field actually constrains the schedule.

Common Schedules

*/5 * * * *Every 5 minutes, around the clock - common for health checks and light polling jobs.
0 9 * * 1-5Every weekday at 9:00 AM - a typical "start of business" report or sync job.
30 2 * * *Every day at 2:30 AM - a classic off-peak nightly backup window.
0 0 1 * *Midnight on the 1st of every month - common for monthly billing or report generation.

Frequently Asked Questions

Where does the cron syntax and the name "cron" come from?

The name comes from the Greek word chronos, meaning time. Cron is a Unix utility dating back to 1970s AT&T Unix, and its 5-field minute/hour/day-of-month/month/day-of-week format became the de facto standard - it's why CI/CD platforms, Kubernetes CronJobs, and countless other schedulers still use the same field order and wildcard/range/step syntax today, even though they aren't running the original Unix daemon.

Are named shortcuts like @daily or @hourly part of standard cron?

No. @daily, @hourly, @weekly, and similar shortcuts are extensions added by some cron implementations and platforms as a convenience, not part of the base 5-field format - they just expand to a fixed expression (@daily is shorthand for 0 0 * * *). This tool only accepts the raw 5-field syntax, so shortcuts like these need to be expanded before pasting them in.

Does the next-run calculation account for timezones?

No - it runs on plain JavaScript Date arithmetic using your browser's local clock and timezone. If the expression will actually execute on a server or CI runner configured for a different timezone (many run in UTC), the real run times will be offset from what's shown here, so check what timezone your scheduler uses before relying on the exact times.

What does */15 actually mean?

*/15 is a step value applied across the field's full range. In the minute field it means every 15th minute starting from 0 - i.e. 0, 15, 30, 45. A step can also be applied to a range, e.g. 9-17/2 means every 2nd hour between 9 and 17: 9, 11, 13, 15, 17.

Does this tool support 6-field cron expressions with seconds?

No, only the standard 5-field format (minute hour day-of-month month day-of-week) used by Unix/Linux cron and most schedulers. Expressions with a seconds field, as used by some platform-specific schedulers, will be rejected as having the wrong number of fields.

How are the next 5 run times calculated?

Starting from the current time, the tool steps a candidate date forward - jumping to the next matching month, day, hour, or minute whenever a field doesn't match - and collects the first 5 moments where every field is satisfied. It's implemented as plain JavaScript Date arithmetic, with no external cron library.

Open Cron Builder