/Step values (/) in cron expressions
The slash means "every n units". The part before it is where counting starts: */15 and 0/15 both mean every 15 starting from the first value.
The rules
- */15 in minutes: 0, 15, 30, 45.
- 5/20 in minutes: 5, 25, 45 (starts at 5).
- 10-40/10 in minutes: 10, 20, 30, 40.
- The count restarts at the beginning of each larger unit, so a step that does not divide evenly leaves a short gap at the end.
Examples you can copy
*/20 * * * *Every 20 minutes. Every 20 minutes: 0, 20, 40.
First runs after 1 Jan 2027 (UTC): Fri, 01 Jan 2027, 00:20 ยท Fri, 01 Jan 2027, 00:40 ยท Fri, 01 Jan 2027, 01:00
5/20 * * * *Every 20 minutes starting at minute 5. Starts at minute 5: 5, 25, 45.
First runs after 1 Jan 2027 (UTC): Fri, 01 Jan 2027, 00:05 ยท Fri, 01 Jan 2027, 00:25 ยท Fri, 01 Jan 2027, 00:45
0 0/20 * * * ?Every 20 minutes starting at minute 0. Quartz style of every 20 minutes.
First runs after 1 Jan 2027 (UTC): Fri, 01 Jan 2027, 00:20 ยท Fri, 01 Jan 2027, 00:40 ยท Fri, 01 Jan 2027, 01:00
*/7 * * * *Every 7 minutes. Not a divisor of 60: runs at 0, 7, 14 ... 56, then again at 0 (a 4-minute gap).
First runs after 1 Jan 2027 (UTC): Fri, 01 Jan 2027, 00:07 ยท Fri, 01 Jan 2027, 00:14 ยท Fri, 01 Jan 2027, 00:21
Common mistakes
- Expecting */7 to run every seven minutes. It restarts every hour.
- Forgetting the slash: 15 * * * * runs once an hour at minute 15.
Frequently asked questions
What is the difference between */15 and 0/15?
None in the minutes field. Both start at 0. In Quartz 0/15 is the more common spelling.