| From | Sent On | Attachments |
|---|
| Subject: | crontab : day-of-month support for last-day-of-month | |
|---|---|---|
| From: | Nicolas Blais (nb_r...@videotron.ca) | |
| Date: | Aug 30, 2005 9:02:13 pm | |
| List: | org.freebsd.freebsd-questions | |
Refine Search
| From | Sent On | Attachments |
|---|---|---|
| Nicolas Blais | Aug 28, 2005 5:53 pm | |
| Lowell Gilbert | Aug 30, 2005 1:49 pm | |
| Kevin Kinsey | Aug 30, 2005 3:17 pm | |
| Nicolas Blais | Aug 30, 2005 9:02 pm |
| Subject: | crontab : day-of-month support for last-day-of-month | |
|---|---|---|
| From: | Nicolas Blais (nb_r...@videotron.ca) | |
| Date: | Aug 30, 2005 9:02:13 pm | |
| List: | org.freebsd.freebsd-questions | |
On August 30, 2005 11:16 am, Kevin Kinsey wrote:
Nicolas Blais wrote:
Hi,
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.
Nicolas.
As Lowell noted, "last day" isn't an option currently. Any number of scripting languages, though, are capable of handling this.
Here was a solution we came up with, using PHP, a couple years ago:
http://www.daleco.biz/articles/page.php?story=20
I'm sure something like this, or better, would be possible with PERL, ruby, etc., or possibly even sh/bash, though I've not tried.
HTH,
Kevin Kinsey
Ok, well I'll try to make a patch for my side. I still believe that having the option is better that not having it at all, though I may be wrong.
Thanks for your replies! Nicolas.
-- FreeBSD 7.0-CURRENT #0: Sat Aug 27 13:03:30 EDT 2005 root@clk01a:/usr/obj/usr/src/sys/CLK01A PGP? : http://66.130.198.54:8081/security/nb_root.asc

