I'd consider offloading the work to the shell if you want to run things every other day, e.g.:
* * * * * [ $(($(date +\%w) \% 2)) -eq 0 ] || echo skipped-a-day
I'd consider offloading the work to the shell if you want to run things every other day, e.g.:
* * * * * [ $(($(date +\%w) \% 2)) -eq 0 ] || echo skipped-a-day
Top of my script was a simple if-clause, when alternate-day.txt is found, it will be removed and the script runs. If no .txt is found it will be created and the script exits. A bit lame, but it worked and was quick :)
As mentioned, the next problem appears when the job takes longer than two days, which requires using flock. I often prefer to use mkdir instead of flock, provided your mkdir is atomic and POSIX compliant... which is usually the case AFAIK. E.G. mkdir a-lock-dir || exit;... rmdir a-lock-dir
Ultimately I don't have too many complaints about cron. But, like anything, it has it's own quirks. Indeed a handy article.
There's many such examples - every 1, 2, 3, 4, 6 hours works - but every 5 hours doesn't. But every 2 days and every 14 days are requirements I've met IRL.