[launchd-dev] Why no key to "Run once on restart"
Jerry Krinock
jerry at ieee.org
Tue May 24 14:15:38 PDT 2011
On 2011 May 24, at 01:01, Thomas Clement wrote:
> You should probably use "RunAtLoad" instead of "StartOnMount".
Ah, hand hits forehead. You see, in my apps, I use my addLaunchdAgent routine which writes the plist file and then spawns launchctl to *load* it. So for years now, I've always thought of installing and loading as a single operation, unlike everyone else who installs their task and then wonders why it doesn't work.
So, I'd thought that if I "added" "RunAtLoad" it would run immediately when I added it, which was not acceptable. The obvious solution is to not install but not load it.
Now I understand why no one else ever asked this :))
Thank you, Thomas.
Jerry
More information about the launchd-dev
mailing list