Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sansumbrella/1033640 to your computer and use it in GitHub Desktop.
Save sansumbrella/1033640 to your computer and use it in GitHub Desktop.
Sample launchctl plist. Put in ~/Library/LaunchAgents/
<?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.sansumbrella.scriptlauncher</string>
<key>Program</key>
<string>/usr/bin/python</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
<string>/path/to/script.py</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>4</integer>
</dict>
</dict>
</plist>
@sansumbrella
Copy link
Author

Runs script at startup and every 4 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment