Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.