Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to issue two commands, c1 and c2, both every five minutes, but not at the same time, e.g.

0,5,10,15,20,... * * * * c1
2,7,12,17,22,... * * * * c2

is there a more elegant version using an asterisk instead of listing the numbers for c2?

share|improve this question

Something like this will do the job:

*/5     * * * * c1
2-59/5  * * * * c2

The first command (c1) will run at 0, 5, 10, 15, etc.
The second command (c2) will run at 2, 7, 12, 17, etc.

This may not work with all versions of cron.

share|improve this answer
Thanks, that worked – max123 Jan 19 '12 at 15:14

Your Answer


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.