[Techtalk] Age-old cron problem

Wim De Smet kromagg at gmail.com
Mon Dec 10 15:27:14 UTC 2007


On Dec 10, 2007 2:54 PM, Nicoya Helm <nicoya at nicoya.org> wrote:
> I think I will try this approach: via script, write a date to a file
> somewhere on the starting Sunday as a reference for a counter.  In that
> same script, put in logic to increment the date counter by one (i.e.
> day) then test to see if we have reached the max (14 days).  If we have,
> run the required Every-Other-Sunday-action, then reset counter.  Rinse
> and repeat.  This will still require a manual kick-off on the first
> Sunday, but after that should run every 14 days, i.e. every other
> Sunday.

If you need to kick it off manually anyway anacron can probably take
over everything you're writing now, as it allows you to schedule a
task to run every x days(so just fill in x=14 and start on a sunday).
It uses a date based mechanism very similar to what you are describing
so looks like it would still be quite accurate.

greets,
Ix


More information about the Techtalk mailing list