Concept

What is the step value in cron?

A step value /N means "every Nth value within the range." So */5 in the minute field means "every 5th minute starting at 0" — i.e., minutes 0, 5, 10, 15, ... 55.

How steps work

The general form is RANGE/STEP. The range can be:

  • * — the full allowed range for that field
  • A-B — a specific range
  • A list with steps applied (less common, varies by implementation)

So */5 is shorthand for 0-59/5 in the minute field (which has range 0-59).

Examples

ExpressionFieldFires at
*/5Minute (0-59)0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55
*/15Minute (0-59)0, 15, 30, 45
*/2Hour (0-23)0, 2, 4, 6, ..., 22
*/3Hour (0-23)0, 3, 6, 9, 12, 15, 18, 21
9-17/2Hour9, 11, 13, 15, 17
*/7Day of month (1-31)1, 8, 15, 22, 29

Common mistakes

Step is not "every N from now"

*/5 doesn't mean "fire 5 minutes from when I install this." It means "fire at minute 0, 5, 10, 15, ..." of every hour. If you install at 9:03 PM, the next fire is at 9:05 PM (2 minutes later), not 9:08 PM.

Step in day-of-month resets each month

*/5 in the day-of-month field fires on days 1, 6, 11, 16, 21, 26, 31. But the count resets at the start of each month — so the actual interval between runs varies (4, 5, 5, 5, 5, 5, then 1 day at month boundary).

This is rarely what people intend. For a strict "every 5 days," use anacron, systemd timers with OnUnitActiveSec=5d, or a script that checks a timestamp.

Step with single value is meaningless

5/10 in the minute field is illegal in most implementations — a step needs a range. Use */10 or 5-59/10.

Equivalent explicit forms

Sometimes you'll see the step expanded to a comma list — they're equivalent:

*/5 * * * *
# Same as:
0,5,10,15,20,25,30,35,40,45,50,55 * * * *

Quartz / AWS / Spring

Step values work the same way in Quartz, AWS EventBridge, GitHub Actions, Spring @Scheduled — anywhere that supports cron syntax. The only difference is the field count (Quartz has seconds + optional year).

Related

Continue reading.