Re: How to script the launching of a script at a specific time...


Jean-Christophe Helary <jean.christophe.helary@...>
 



On Dec 7, 2017, at 17:34, 2551phil <2551phil@...> wrote:

Good work! I shall retweet that.

Wow, thank you Phil :-)

BTW, you don’t need to specify both Program and Program Arguments in your plist.

I know. I wrote about that in the comments. It is just that the sample files I got all had both, so I though it was better to keep the data just to be on the safe side.

If you leave out the Program key (and the osascript string that follows it), launchd will take the first item in the Program Arguments array as the Program (which you correctly have as the path to osascript).

The way you’re doing it, you’re technically passing /usr/bin/osascript as the first argument to /usr/bin/osascript, which you don’t really want to do.

Are you sure? That's not what I understood from the docs. My understanding was that if Program Arguments is there, Program is ignored. And the first element of Program Arguments is the argument to exec.


Jean-Christophe Helary
-----------------------------------------------
@brandelune http://mac4translators.blogspot.com


Join applescript@apple-dev.groups.io to automatically receive all group messages.