How can I create a cron job that runs a task every three weeks?

Posted by itj on Super User See other posts from Super User or by itj
Published on 2010-02-19T16:18:41Z Indexed on 2010/03/16 19:41 UTC
Read the original article Hit count: 178

Filed under:
|

I have a task that needs to be performed on my project schedule (3 weeks).

I'm able to set up cron to do this every week, or (for example) on the 3rd week of every month - but can't find a way to do this every three weeks.

I could hack the script to create temporary files (or similar) so it could work out it was the third time it has been run - but this solution smells.

Can it be done in a clean way?

© Super User or respective owner

Related posts about cron

Related posts about unix