I have written a python script named Music_Scrape.py that resides in the following directory /Users/MY_USER_NAME/code/Python_Projects. The script runs with the terminal command /Users/MY_USER_NAME/code/Python_Projects/Music_Scrape.py. I am attempting to have this run every day, but cannot seem to get either cron or launchd to work. I am using OSX El Capitan Version 10.11.6.
Creating the following in CronniX did not work (I attempt to run every minute for debugging purposes).
I also attempted to use launchd with the following plist file. This is placed in the ~/Library/LaunchAgents directory. I attempted to launch that with the following commands:
launchctl load ~/Library/LaunchAgents/pullMusic.plist
launchctl start pullMusic
Again nothing happened.
<?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>
<!-- The label should be the same as the filename without the extension -->
<string>pullMusic</string>
<!-- Specify how to run your program here -->
<key>Program</key>
<string>/Users/samuelcurtis/code/Python_Projects/Music_Scrape.py</string>
<!-- Run every minute -->
<key>StartInterval</key>
<integer>60</integer><!-- seconds -->
</dict>
</plist>
I have read many posts relating to this issue and have tried using absolute file paths and changing permissions, neither of which seems to have helped. It seems that scheduling a command line command to execute at certain intervals should be a more simple task, but apparently not! What steps would one recommend to debug the issue?