Re: Launch agent issue
Re: Launch agent issue
- Subject: Re: Launch agent issue
- From: Ted Wrigley <email@hidden>
- Date: Thu, 15 Jan 2015 11:05:37 -0800
You probably do not want to be invoking sh. If you were running a script you would invoke osascript directly from launchd, like so:
<key>ProgramArguments</key>
<array>
<string>/usr/bin/osascript</string>
<string>/Library/Scripts/Universal\ Scripts/MorningStartUp.app</string>
</array>
But in fact you are launching an applet, so you don’t even need to call osascript:
<key>Program</key>
<string>/Library/Scripts/Universal\ Scripts/MorningStartUp.app</string>
Note that you do not need to use the Program key if you are using the ProgramArguments key, and vice-versa.
Depending on the nature of the applet, you may need to add other keys. Use this if the applet launches sub processes (otherwise the subprocesses will be killed when the applet finishes running):
<key>AbandonProcessGroup</key>
<true/>
Use this key if the applet is a stay-open applet you want always to be running.
<key>KeepAlive</key>
<true/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden