launchd support ranges for StartCalendarInterval?
Hello Dave: Emailed this answer in the past and I was wondering if he or someone else would be willing to email out a example for a range of hours by having StartCalendarInterval be an array of dictionaries instead of just a dictionary... Would it be something like this.? <key>StartCalendarInterval</key> <array> <key>Hour</key> <integer>4</integer> <key>Minute</key> <integer>0</integer> <key>Weekday</key> <integer>0</integer> </array> <array> <key>Hour</key> <integer>5</integer> <key>Minute</key> <integer>0</integer> <key>Weekday</key> <integer>0</integer> </array> For every range of hours?
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
Thanks: Richard Glaser University of Utah - Student Computing Labs richard@scl.utah.edu 801-585-8016
participants (1)
-
Richard Glaser