I've done quite a bit of research in how to do this, and I see there's no direct way in cron to run a job, say, every other Thursday.
Right now, I'm leaning toward making a script that will just run every week, and will touch a "flag" file when it runs, and if it runs and the file is already there, to remove the file (and not perform the bi-weekly action).
My question is, is there any other more elegant or simpler way to accomplish this goal of a bash script of actions running every other week automatically?
Thanks!
Best Answer
I used bash to do my math because I'm lazy; switch that to whatever you like. I take advantage of January 1, 1970 being a Thursday; for other days of the week you'd have to apply an offset. Cron needs the percent signs escaped.
Quick check:
Note I've chosen random times to show this will work if run anytime on Thursday, and chosen dates which cross year boundaries plus include months with both 4 and 5 Thursdays.
Output: