Launchd item no longer firing in Snow Leopard
Posted
by
ridogi
on Super User
See other posts from Super User
or by ridogi
Published on 2010-01-20T23:47:47Z
Indexed on
2011/01/16
23:55 UTC
Read the original article
Hit count: 336
osx-snow-leopard
|launchd
A launchd item that was working in 10.5 is no longer working after my upgrade to 10.6. I am running 10.6.2 and I have recreated the launchd item and given it a new name and that one doesn't run either.
I have found a link of people with the same problem on google groups but none of the advice in that link helps. My launchd item is not listed in /private/var/db/launchd.db/com.apple.launchd/overrides.plist
or in any of the overrides.plist files in the subdirectories of /private/var/db/launchd.db/
I have also tried to set this up as both a user agent and a user daemon.
My launchd item simply runs a shell script, which I have no problem launching manually.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.eric.tmnotify.launchd</string>
<key>ProgramArguments</key>
<array>
<string>/<path_to>/tmnotify.sh</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
</dict>
</plist>
I have tried to load it by overriding the disabled key (even though it is not disabled in any of the overrides.plist files) with both:
sudo launchctl load -F /Users/eric/Library/LaunchAgents/com.eric.tmnotify.launchd.plist
sudo launchctl load -w /Users/eric/Library/LaunchAgents/com.eric.tmnotify.launchd.plist
and after running either of them I can see that it is running by using sudo launchctl list
but the shell script never fires.
Edit: I have also put this in the formerly blank file at /private/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.eric.tmnotify.launchd</key>
<dict>
<key>Disabled</key>
<false/>
</dict>
</dict>
</plist>
I also tried inserting this alphabetically:
<key>com.eric.tmnotify.launchd</key>
<dict>
<key>Disabled</key>
<false/>
</dict>
into the file /private/var/db/launchd.db/com.apple.launchd/overrides.plist
but still no dice.
© Super User or respective owner