Running A Python Script On Mac Boot
Solution 1:
Some time ago I used cron to do just that. You can make an entry like this
@reboot /path/to/my/script
The path to my script will be the path to your appstart.sh file.
So you open your terminal.
You type in crontab -e
(this will open a file in your default editor, problably nano)
You scroll down and on the bottom of the file you type @reboot /path/to/file
Then you save and exit.
Solution 2:
Make sure the .plist file is chmod 644.
You asked for "run on Mac boot" and "run on startup" which tells me you are in the wrong directory. LaunchAgents is for running scripts on user login. To run on startup the .plist file needs to be in /Library/LaunchDaemons and owned by root:wheel.
If you don't need a shell to launch a shell script to launch python then I recommend a shortcut:
<key>ProgramArguments</key><array><string>/usr/bin/python</string><string>/var/www/html/app/app.py</string></array>
Post a Comment for "Running A Python Script On Mac Boot"