In crontab, I can use an asterisk to mean every value, or ‘*/2’ to mean every even value.
Is there a way to specify every odd value? (Would something like ‘1+*/2’ work?)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depending on your version of cron, you should be able to do (for hours, say):
Going by the EXTENSIONS section in the crontab(5) manpage:
For a more portable solution, I suspect you just have to use the simple list:
But it might be easier to wrap your command in a shell script that will immediately exit if it’s not called in an odd minute.