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?

link|improve this question
feedback

1 Answer

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.

link|improve this answer
Thanks, that worked – max123 Jan 19 at 15:14
feedback

Your Answer

 
or
required, but never shown

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