Re: launchd - is my job already loaded?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Feb 27, 2009, at 10:14 AM, Tim Murison wrote: I have a need for a periodic (in this case, twice per day) per user task. I'm setting up this task programatically. Is there an API for launchd/launchctl, or should I just fork+exec launchctl to setup my job? 'man launchd.plist' documents StartInterval and StartCalendarInterval options. Are they what you want? No. Let me try to be more clear. I write out a job .plist file to the appropriate place.
From the terminal, I can execute launchctl load <file> to load the job, and launchctl list to see the list of loaded jobs just fine (and my job does what I want). Jim
Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... But I am setting this up programatically. So, is there an API to do this, or is the correct/supported/only way to do this by fork+exec launchctl? Also, is there a prettier way of determining if a job is loaded other than exec `launchctl list` and parsing the output? This email sent to site_archiver@lists.apple.com
participants (1)
-
Jim Correia