Cron · <code>1,15,30</code>

Cron ranges and lists

Commas combine values and hyphens define inclusive ranges; both can be mixed and both may use month or weekday names.

Key facts

List<code>1,15,30</code>
Range<code>1-5</code>, inclusive on both ends
Combined<code>1-5,20-25,50</code>
NamesJAN–DEC and SUN–SAT may replace numbers
Wrap-aroundNot supported — <code>22-2</code> is invalid
Wildcard<code>*</code> equals the full field range

Sets, not sequences

Every field describes a set of allowed values. 1,15,30 in the minute field runs at those three minutes of every hour; 1-5 runs in the first five minutes. Order does not matter and duplicates are harmless, though some parsers reject them as malformed.

Ranges are inclusive: 9-17 in the hour field includes both 09:00 and 17:00. Combining forms is ordinary: 0-30/10,45 means minutes 0, 10, 20, 30 and 45.

Ranges that wrap around midnight

A range must be ascending. 22-2 in the hour field is rejected rather than interpreted as 22:00 through 02:00. Write it as 22-23,0-2. The same rule applies to weekday ranges that cross Sunday: use 5-7,0 or the equivalent names instead of 5-1.

Short months and missing days are not errors: a day-of-month list simply matches less often in months that lack those days. This is usually what you want for a monthly report, but it is the wrong tool for “last day of the month” — cron has no built-in last-day token.

Frequently asked questions

Are cron ranges inclusive?

Yes. 1-5 includes both 1 and 5.

Why is 22-2 rejected?

Cron ranges must ascend within the field. Split the wrap-around into 22-23,0-2.

Can I use names in a range?

Yes in Vixie-style implementations: MON-FRI works, and names can be mixed with numbers in a list.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.