Gary Antonellis
asked on
CRON expression that fires every other Tuesday
I need a CRON expression that fires every other Tuesday at 2AM. It is used to run a payroll process and the pay periods are 2weeks long.
There is no relationship to certain Tuesdays of the month, it simply must fire one Tuesday then skip the next. If possible it would be nice to specify an 'anchor' date.
Thanks!
There is no relationship to certain Tuesdays of the month, it simply must fire one Tuesday then skip the next. If possible it would be nice to specify an 'anchor' date.
Thanks!
My recommendation would be to wrap your script in bash or python or similar and perform your logic there. Have your cron fire that script every Tuesday and have your script logic figure out if it's been an even or odd number of weeks since your "anchor date"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This looks clever, cant wait to try it out!
THanks!
THanks!