Hello Dave: Ok, I filled it with BugReporter. Here is the bug ID... 5689503 launchd support for ranges Also, any suggestions on why a cron job with the ranges listed below would run the script daily at 4 AM vs 1st & 3rd Sun @ 4 AM and 2nd & 4th Sun @ 4 AM. Does it should like an issue with how launchd is interpreting the cron task? This is on Mac OS X 10.5.1 Server... Here is the bug ID... 5689564 Mac OS X 10.5.1 Server Launchd not running crontabs with ranges correctly On Jan 16, 2008, at 9:39 AM, Dave Zarzycki wrote:
Yes, you can do this. Have StartCalendarInterval be an array of dictionaries instead of just a dictionary within the configuration file. Having said that, it would be nice if launchd natively supported some of the common calendar expressions such as {first,second,third,forth,last,second-to-last} {mon,tue,wed,thr,fri,sat,sun}. Doing so would save people the trouble of figuring out the ranges.
Feel free to file an enhancement request,
davez
P.S. -- I've occasionally wanted, just for giggles, to have launchd to support other time intervals such as "only during leap years" or the ability to schedule jobs based on the phase of the moon, or the solstices/equinoxes. I've even considered adding planetary alignment to the schema. :-P
On Jan 15, 2008, at 4:33 PM, Richard Glaser wrote:
FYI:
Sorry, for this slightly off-topic..
Does launchd does support ranges say for "Days" in the StartCalendarInterval?
For example, with cron if I wanted to run a script on the first & third Sunday of each month at 4 AM. I could use this code with a range...
# minute hour mday month wday who command 0 4 1-7,15-21 * 0 root /path/to/script1
Then I could run another script the second & fourth Sunday of each month at 4 AM...
# minute hour mday month wday who command 0 4 8-14,22-31 * 0 root /path/to/script2
Is this possible with launchd?
Thanks:
Richard Glaser University of Utah - Student Computing Labs richard@scl.utah.edu 801-585-8016
_______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/launchd-dev
Thanks, Richard Glaser University of Utah - Student Computing Labs