I have 2 cron jobs, i want one of them to run every odd minute (1,3,5,7,9,11....57,59) and i want the other one to run every even minute (0,2,4,6,8,10,12...58)
how can i do it in an easy way? (no scripting - just cron job rules)
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this community*/2 * * * * date >>/tmp/even
1-59/2 * * * * date >>/tmp/odd
*/2 * * * * /path/to/foo
*/2 * * * * sleep 60; /path/to/bar
Is that that sleep 60
too much like a script?
You can use
1/2 * * * * for odd minutes
*/2 * * * * for even minutes