I've found an useful info from the official documentation:
Step values can be used in conjunction with ranges. Following a range
with /<number>
specifies skips of the number's value through the
range. For example, 0-23/2
can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is 0,2,4,6,8,10,12,14,16,18,20,22
). Steps are also permitted after an asterisk, so if you want to say every two hours, just use */2
.
― man 5 crontab
- 4th Berkeley Distribution - 19 April 2010
In short, all of these are valid syntax:
0-55/5 * * * *
\ \ \ \ \- every day of week
\ \ \ \-- every month
\ \ \--- every day of month
\ \---- every hours
\----------- from minute 0 to 55, using a step of 5 minutes
That means minute 0, 5, 10, 15, ..., 45 and 55 included.
man 5 crontab
has explanations too.man
? I read throughman crontab
and through it was the end.man crontab
brings up the first entry forcrontab
, which is for thecrontab
command in section 1. Towards the end of that manpage, it saysSEE ALSO crontab(5)
. That tells you that you can useman 5 crontab
to read thecrontab
entry in section 5, which describes the format of thecrontab
file.(3)
thing in theSEE ALSO
section!