Cron · <code>*/n</code> or <code>a-b/n</code>

Cron step values

A slash adds a step to a range: */5 means every fifth value starting at the range's lower bound.

Key facts

Syntax<code>*/n</code> or <code>a-b/n</code>
MeaningEvery nth value inside the range
*/5 minutes0, 5, 10, …, 55
*/2 day-of-month1, 3, 5, …, 31
Step zeroInvalid
Equivalent forms<code>0/15</code> and <code>*/15</code> behave the same in Vixie cron

The step starts at the bottom of the range

*/15 in the minute field expands to 0,15,30,45 because the field's range starts at 0. The same syntax in day-of-month starts at 1, so */2 selects odd days: 1, 3, 5 and so on. That difference surprises people who expect “every second day” to begin with day 2.

An explicit range moves the starting point: 1-31/2 is the same odd-day set, while 2-30/2 selects even days. A step larger than the range width yields only the range's first value.

Intervals that do not divide the field

A single field cannot express “every 90 minutes”, because the minute field resets at the top of each hour. Splitting the job across several lines (0 0-23/3 * * * plus 30 1-23/3 * * *) or tracking the last run inside the command are the usual workarounds.

Steps also interact with long intervals: */7 in minutes fires at minute 0, 7, 14, …, 56 and then jumps to 0 of the next hour, producing a 4-minute gap at the boundary. That cumulative drift is why schedules that must be evenly spaced avoid steps that do not divide 60.

Frequently asked questions

Does */5 mean every five minutes?

Yes, in the minute field: minutes 0, 5, 10 and so on, giving a five-minute gap except at the hour boundary where it is exactly five minutes.

Why does */2 in day-of-month start on the 1st?

The field's lowest legal value is 1, and a step counts from the start of the range. Use 2-30/2 if you want even days.

Can a step use a zero interval?

No. A step of 0 is invalid and is rejected by the cron parser.

New tools, straight to your inbox

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