6

*/n * * * * in a crontab means run every n minutes, if n divides 60 evenly. What happens for other cases, like */13 * * * *?

1 Answer 1

10

'*' is equivalent to the full range of possible values, in this case '0-59'

'/13' represents the "step size" or increment used to determine the next run, starting with the initial possible value. (e.g. "Every 13 minutes starting at 0")

When the minutes get reset (59 to 0) it starts over. So for example */13 will always run on 0 13 26 39 52.

Another example from the comments:

"Setting minutes as 3-59/5 will first fire at 3 and last fire at 58." -- DZet

3
  • 1
    It is not the remainder, it is step size. Setting minutes as 3-59/5 will first fire at 3 and last fire at 58.
    – DZet
    Feb 16, 2023 at 17:56
  • Thanks for pointing that out. This answer needs to be updated. Do you think "step size" is the right term that everyone would understand?
    – Angelo
    Feb 20, 2023 at 4:23
  • I think step size should be fine
    – DZet
    Feb 23, 2023 at 16:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .