# cron every X exact meaning

In cron you can specify */n where n means every n times period, for instance in the first column is minute.

*/5 means every 5 minutes, but which minutes? 0, 5, 10, ...?

What happens if the number specified is not a divisor of 60?

*/7 what will happen, will it start to skew in the next hour?
-

It'll go on 7, 14, ... 56, 0, 7, 14, ...

With that syntax, I like to think of it as going when t mod x === 0

-
Thanks this clears my doubt – stivlo Nov 29 '11 at 4:16

In crontab, * is a shorthand for first-last (where first is the minimum possible value and last is the maximum possible value).

The syntax first-last/step means "every N where N >= first and N <= last and (N - first) % step == 0".

So */7 in minutes means the same as 0,7,14,21,28,35,42,49,56. But 1-59/7 means 1,8,15,22,29,36,43,50,57.

-
So I'm not sure if I understand, Why did you choose 1 for first and not 0? – stivlo Nov 30 '11 at 4:36
@stivlo, to illustrate the difference between 0-59/7 (a.k.a. */7) and 1-59/7. – cjm Nov 30 '11 at 5:14