3

I am looking for clarification with the cron tab that I am working with.

some job    1   *   *   *   *
some job    1   */1 *   *   *

Are those jobs the same? The job will run the first minute every hour.

Prehaps some one could clarify the difference between * and */x in crontab.

m4573r
  • 5,701
nelaaro
  • 14,139
  • 30
  • 88
  • 115

1 Answers1

7

Yes those are the same. From the man page (man 5 crontab):

A field may be an asterisk (*), which always stands for ``first-last''.
[...]
Ranges can include "steps", so "1-9/2" is the same as "1,3,5,7,9".

Therefore */x means the whole range (depending on the position of the *) covered with steps of x.

In your case, for the "hour" position, the first-to-last range is 0 to 23. So * = 0-23, and */1 = "0,1,2,...,22,23", which is exactly the same.

m4573r
  • 5,701