Re: launchd - is my job already loaded?
Re: launchd - is my job already loaded?
- Subject: Re: launchd - is my job already loaded?
- From: Jim Correia <email@hidden>
- Date: Fri, 27 Feb 2009 11:05:54 -0500
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).
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?
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden