Skip to main content

Timeline for answer to Plist Not Running AppleScript using launchctl by Graham Miln

Current License: CC BY-SA 3.0

Post Revisions

6 events
when toggle format what by license comment
Feb 16, 2017 at 18:46 vote accept cphill
Feb 16, 2017 at 18:45 comment added cphill Your code above worked. All I did was add in <string>/usr/bin/osascript</string> and my AppleScript ran like a charm. Thank you!
Feb 16, 2017 at 17:01 comment added Graham Miln Launchd jobs can only execute one process. You could modify the launchd job to call your shell script directly – then both commands could be placed in the script. If this is for work, consider something like Power Manager or another third party tool.
Feb 16, 2017 at 16:58 comment added cphill Thanks for the answer. I'm not sure if I would need to as I'm just learning about plists and launchd. To sum up my shell script above, I'm changing directories to where my app.js file exists and then indicating where node exists and running the nodejs comman on my js file with an argument. Your answer above looks like it only includes the second half of the command. Would it possible to do both within the plist?
Feb 16, 2017 at 16:16 history edited Graham Miln CC BY-SA 3.0
added 296 characters in body
Feb 16, 2017 at 16:10 history answered Graham Miln CC BY-SA 3.0