0

I'm trying to run a launchctl process that runs a simple python script (that opens a browser window) on my mac but it's not running. Here's are the steps I'm taking:

  1. save plist file to ~/Library/LaunchAgents
  2. launchctl unload org.name.open-browser.plist
  3. launchctl load org.name.open-browser.plist
  4. launchctl start org.name.open-browser

However, the browser window isn't opening. When I run launchctl list org.name.open-browser I get the following output:

{
    "LimitLoadToSessionType" = "Aqua";
    "Label" = "org.brad.alpha";
    "TimeOut" = 30;
    "OnDemand" = true;
    "LastExitStatus" = 19968;
    "Program" = "python3";
    "ProgramArguments" = (
        "python3";
        "/Users/BradsMacbookPro/Documents/open_fb.py";
    );
};

That LastExitStatus should be 0 right? What does 19968 mean? And what might I be doing wrong here?

I have a mid-2014 macbook pro running OSX El Capitan. Maybe upgrading to Sierra might help?

Johnny Metz
  • 5,977
  • 18
  • 82
  • 146
  • Hm, I'm getting the same code with a node.js installation through homebrew. I'm referring to the full path, though. – Paul Dec 06 '21 at 17:47

1 Answers1

2

You have to specify the full path to the executable for example

"Program" = "/usr/bin/python3"
vadian
  • 274,689
  • 30
  • 353
  • 361