Launch Agent Unloads on Reboot

magilum

Registered
I have a LaunchAgent (~/Library/LaunchAgents) with WatchPaths set to monitor about a dozen files. I've updated the format to work with Leopard (e.g. using KeepAlive instead of OnDemand).

I can load it either through Lingon or launchctl, but on reboot it's no longer loaded.

Mac Pro, Leopard
 
Please add the following sentence structures to xml.
-------
<key>RunAtLoad</key>
<true/>
-------
When it wants to start at the time of start at the same time, please appoint <false/> when I do not want to do <true/>.
 
Hi Kenichi. Thanks for your reply.

I added that key, but unfortunately I got the same result. I've also updated the OS to 10.5.7, but this didn't help either. The console isn't showing any errors with the LaunchAgent at all, and I've been able to load the LaunchAgent successfully on reboot using a different computer; so I don't know why this is happening.

I've removed the specific references to files, but here's the plist's contents:

Code:
<?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>KeepAlive</key>
	<true/>
	<key>RunAtLoad</key>
	<true/>
	<key>Label</key>
	<string>com.theuser.broadcast</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Users/theuser/myscript.sh</string>
	</array>
	<key>WatchPaths</key>
	<array>
		<string>/Users/theuser/myfile1.txt</string>
		<string>/Users/theuser/myfile2.txt</string>
		<string>/Users/theuser/myfile3.txt</string>
		<string>/Users/theuser/myfile4.txt</string>
		<string>/Users/theuser/myfile5.txt</string>
	</array>
</dict>
</plist>
 
Back
Top