I have a python script in a virtualenv (ENV) that calls on other modules in the ENV. I want to run the script at a certain time each day. Therefore, being on OS X, I should use launchd.
I have written a .plist and put in ~/Library/LaunchAgents for per user use. I have loaded the .plist but am getting an error in my console of the following variety:
14/03/13 10:51:50.000 PM kernel: CODE SIGNING: cs_invalid_page(0x10ce98000): p=1279[python] clearing CS_VALID
I confirmed this message is related to the script, or the launchd process, by setting the .plist key StartInterval to 15 and seeing the message appear every 15 seconds.
Here is the .plist:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.dayone.archive</string> <key>ProgramArguments</key> <array> <string>/Users/css/Working/PythonScripts/ENV/bin/python</string> <string>/Users/css/Working/PythonScripts/ENV/bin/recentLinks.py</string> </array> <key>StartInterval</key> <integer>15</integer> <key>KeepAlive</key> <true/> <key>WorkingDirectory</key> <string>/Users/css/Working/PythonScripts/ENV/bin</string> </dict> </plist>
I have tried the .plist with a bash script calling the python script as well (!) but got the same result. Of course, I have no problem running the bash script from the terminal.