I know I can do this if I call a script to check, but I am curious if I can do this with just the cron.
I need to run a job once/year on the first Saturday of July If that Saturday is July 4th, run it July 5th.
I know I can do this if I call a script to check, but I am curious if I can do this with just the cron.
I need to run a job once/year on the first Saturday of July If that Saturday is July 4th, run it July 5th.
It's that if that'll get you.
Hmmm. You can do it with a 2 liner:
Line 1: 12:12pm on July 1,2,3,5,6 or 7 only if it's a Saturday
Line 2: 12:12pm on July 5 only if it's a Sunday
Line 1 should cover every case except the 4th, and Line 2 should cover the case where Saturday is the 4th of July.