[launchd-dev] Cross-job coalescing

Dave Zarzycki zarzycki at apple.com
Wed Dec 5 08:53:02 PST 2007


On Dec 5, 2007, at 7:02 AM, Jeremy Reichman wrote:

> On 12/5/07 3:58 AM, "Kevin Van Vechten" <kvv at apple.com> wrote:
>
>> Launchd does not run multiple instances of the same job.  Instead  
>> each
>> of the criteria listed in the launchd plist is a reason to start the
>> job only if the job is not already running.
>>
>> StartCalendarInterval supports an array of dictionaries -- you could
>> specify both a nightly time and a weekly time in the same plist,
>> either one of which will cause the job to be run, but not twice when
>> the nightly and weekly times coincide.
>
> I've thought about having multiple schedules, but haven't tried it.
>
> What about mixing a StartCalendarInterval with StartInterval? Or any  
> of the
> *Interval keys with WatchPaths or QueueDirectories? Can that also be  
> done,
> and if so are their differences between Tiger and Leopard? Just  
> curious.

Launchd logically ORs all criteria.

The differences between Tiger and Leopard can be vast or  
inconsequential depending on your perspective. The single largest  
"features" that launchd added were:

1) per-user/per-session launchd magic.
2) Mach support
3) Conditional KeepAlive logic.

davez


More information about the launchd-dev mailing list