[Dirvish] Expire rule for "last day of month"

Shawn Perry redmopml at comcast.net
Thu Jul 6 06:15:24 UTC 2006


On Wednesday 05 July 2006 16:24, Richard Geoffrion wrote:
> dirvish at GMxTechnologies.com wrote:
> > Hi.
> >
> > I'm trying to create some expire-rules, and would like to do something
> > like this:
> >
> >    "last day of month" +12 months
> >
> > Everything else, I have a firm day, but each month can have a
> > different last day, so what would "31" do in February?
>
> *Multiple rules for the respective months (hmm..leap year)
> *a cron job that switchs out / `sed`s your config files based on the
> results of a command such as....
>
> 	if [ ! "`/usr/local/bin/date -d tomorrow +%d`" = "01 ]; then
>
> *running your jobs on the first but changing the vault names to `date -d
> yesterday +%F` (not sure how to do that exactly...but giving advice is
> free so I threw it in at no extra charge! :) )
>
> That LDOM thing really bites.  I know this question is redundant...but
> are you *SURE* you can't do it on the 1st?  12:01am (0001h) is really
> close to 11:59pm (2359h).  I promise you..it's VERY close!

That's how I do it.  On the first at 3:00am in my case.


More information about the Dirvish mailing list