Depending on your version of cron, you will be able to do (for hours, say):
1-23/2
Go to the Extensions section of the crontab (5) man page:
Ranges can include "steps", so "1-9/2" is the same as "1,3,5,7,9".
For a more portable solution, I suspect you just need to use a simple list:
1,3,5,7,9,11,13,15,17,19,21,23
But it may be easier to wrap your command in a shell script that will exit immediately if it is not called in an odd minute.
zigdon Sep 23 '08 at 17:35 2008-09-23 17:35
source share