When I run launchctl to load/start the plist with the following content:
<?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.web_blocker</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Python 3.6</string>
<string>/Users/michaelcunningham/Desktop/website_blocker.py</string>
</array>
<key>StartInterval</key>
<integer>60</integer>
<key>RunAtLoad</key>
</dict>
</plist>
I get the error "invalid property list". How can I resolve this issue?
Best Answer
Your plist is missing at least the line
<true/>
(or<false/>
) after the line<key>RunAtLoad</key>
.The line
<string>/Applications/Python 3.6</string>
is useless because this is just a folder but no app/binary. Your Python script may work nevertheless, provided the shebang is set properly.