Skip site navigation (1)Skip section navigation (2)
Date:      30 Aug 2005 09:49:55 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        Nicolas Blais <nb_root@videotron.ca>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: crontab : day-of-month support for last-day-of-month
Message-ID:  <44u0h7fsak.fsf@be-well.ilk.org>
In-Reply-To: <200508281316.48668.nb_root@videotron.ca>
References:  <200508281316.48668.nb_root@videotron.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
Nicolas Blais <nb_root@videotron.ca> writes:

> Does our crontab allow the use of "L" (as found on 
> http://wiki.opensymphony.com/display/QRTZ1/CronTriggers+Tutorial?decorator=printable) 
> in the day-of-month field which would allow for a job to run on a 31th or feb 
> 28? 
> 
> It would be useful for certain apps like /www/awstats to update their database 
> on the last hour of the month since putting the cron job on the 1st of the 
> month makes the software update in a new month and putting it on the 30th of 
> the month might loose 1 day.

No, we don't have such a capability.  If you go ahead and add it,
please note a few points:

 - There are workarounds that have been around a long time.  Longer
   than Vixie's version of cron, even.

 - It's not as advantageous as it seems at first glance.  Remember
   that various issues beyond the control of cron may cause the job to
   end up being executed in the new month anyway.  So the job you are
   running from cron really needs to be able to handle running in the
   new month, and it is generally simpler to assume that will be the
   case and backdate the file names than to handle it as an error
   case.

 - This particular syntax seems to be unique to the the program
   ("Quartz") you're looking at.  Porting it to FreeBSD might be a
   useful alternative to reimplementing its features (although it
   sounds like vast overkill for your case).

Good luck.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44u0h7fsak.fsf>