I've been trying to set up a script to run a python program at regular intervals using launchd
. The python program fails because it can't find my imports---I know this because I caught the errors in a log file. To fix this problem, I created ~\.MacOSX\environment.plist
, and duplicated my PYTHONPATH
there, logged out and logged in again. This seems to be insufficient to solve the problem, and I'm at a loss as to what else to try.
I'm running OSX, 10.8.3.
Related threads:
- launchd executes python script, but import fails (not applicable--my script points to the right python instance)
UPDATE:
It appears that I can run the following command:
launchctl setenv PYTHONPATH $PYTHONPATH
and the script will execute successfully. So, to modify my question:
- Where does this get stored? I checked
~\.launchd.conf
and\etc\.launchd.conf
, neither existed. - Presumably this setting is dumped when I reboot. Where can I change this information so that
launchd
will find it?