I made a cron to execute a task every tuesday at 3:50 AM - except a tuesday which coincides with the first day of the month:
50 3 * * 2 MyCommand
but I don't know how I can translate my exception into the cron syntax, any tips?
I made a cron to execute a task every tuesday at 3:50 AM - except a tuesday which coincides with the first day of the month:
50 3 * * 2 MyCommand
but I don't know how I can translate my exception into the cron syntax, any tips?
You can set the "day of month" field to the range 2-31, effectively excluding the first day. This should do it:
Can you put a conditional in your script? I would do that. And in your cron you can comment that it won't run on the first per your script directions
As an example, in bash you can do this:
So your cron would be