Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

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.