I am very new to python as well as MAC OSX. For my academic project I need to download a bunch of tweets from twitter using twitter streaming API. I need to download atleast
Adapt the following accordingly, name it something like myscript_launcher.plist
, and put it in either one of three locations: /System/Library/LaunchAgents
, /System/Library/LaunchDaemons
, /Users/
.
Label
my.python.script.name
ProgramArguments
/path/to/python
/path/to/python/script.py
StandardErrorPath
/var/log/python_script.error
KeepAlive
Also, let's assume you put the plist file in ~/Library/LaunchAgents
. You can start and stop it with the launchctl
. To start, use launchctl load ~/Library/LaunchAgents/myscript_launcher.plist
. To stop it, do the same but use the unload
argument