Known bug in Tiger, and fixed in Leopard. For most practical purposes, LaunchAgents don't function as advertised in Tiger. Sorry, davez On Feb 28, 2007, at 3:29 AM, Christopher Hunt wrote:
Hi there,
Please forgive me if this is an inappropriate place to post an observation of launchd that I'm finding hard to understand. Please also feel free to direct me elsewhere as necessary.
I'm trying to execute osascript -e <command> via launchd and it reports an error (an abort) in the system.log file. More specifically:
launchd[4108]: com.classactionpl.restartvision: exited abnormally: Abort trap
Others item of interest: - the user I'm logged in under has not launched the Finder - it is a kiosk style of user where a custom application is launched in place of the Finder. - my plist is under the ~/Library/LaunchAgents i.e. the user's launch agent's directory - all is well if I perform the same osascript command from within the same user's crontab - all is well if I perform the same osascript command from the command line
One particular item of interest is: if I "launchd bash", load the plists and the start the job, the osascript command works! So why shouldn't the command work outside of this?
Here's the plist I'm using:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd "> <plist version="1.0"> <dict> <key>Debug</key> <true/> <key>Label</key> <string>com.classactionpl.restartvision</string> <key>OnDemand</key> <true/> <key>ProgramArguments</key> <array> <string>osascript</string> <string>-e</string> <string>tell application "World" to quit</string> </array> <key>StartCalendarInterval</key> <dict> <key>Hour</key> <integer>0</integer> <key>Minute</key> <integer>0</integer> </dict> </dict> </plist>
Debug etc. doesn't yield more info.
'hoping that someone can help.
Kind regards, Christopher _______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/launchd-dev