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


2551phil
 

Good work! I shall retweet that.

BTW, you don’t need to specify both Program and Program Arguments in your plist. 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.


Best


Phil
@sqwarq


On 7 Dec 2017, at 12:35, Jean-Christophe Helary <jean.christophe.helary@...> wrote:

I just wrote an article on that issue. Thank you all for your help.
(any comments are welcome)

https://mac4translators.blogspot.jp/2017/12/automation-scheduling-file-and.html

On Dec 2, 2017, at 12:19, Jean-Christophe Helary <jean.christophe.helary@...> wrote:

Ok, so the only way to actually launch a script at a given date/time is to use launchd I guess ?

On Dec 2, 2017, at 12:13, Shane Stanley <sstanley@...> wrote:

What I want to do is to script the creation of that event, and for that I need to specify the filepath property of the "open file alert" but *that* doesn't work.

As noted elsewhere, you can't do that since macOS 10.9. The filepath property is a vestige of bygone carefree days.

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



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