Script not running in launchd plist

141 Views Asked by At

I'd like to use launchd to run one of my applescripts at a specific time each day.

I created the plist and put it in the LaunchAgent folder, but it doesn't run the script.

I downloaded LaunchControl, http://www.soma-zone.com/LaunchControl/. When I drag the applescript into the "program to run" box, the path was initially red.

I did a chmod u+x /path/to/script, and the the path turned green.

When I run it in LaunchControl, however, I get an error.

The scripts work fine on their own. I'm not using shell scripts, they are applescripts.

I'm hoping it's just a permissions issue, I'd like to use more launchd agents in the future.

Thanks for any help.

1

There are 1 best solutions below

0
On

I may have found the answer:

I added osascript before the /path/to/script and it seems to work now.