Skip to content

Instantly share code, notes, and snippets.

@venj
Created November 4, 2011 15:00
Show Gist options
  • Save venj/1339514 to your computer and use it in GitHub Desktop.
Save venj/1339514 to your computer and use it in GitHub Desktop.
Use this plist to set up launchd scheduled task to run this script: https://gist.github.com/1339272
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Contains a unique string that identifies your daemon to launchd.
This key is required. -->
<key>Label</key>
<string>me.venj.checkiPhone</string>
<!-- Contains the arguments [to exec()] used to launch your daemon.
This key is required. -->
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ruby</string>
<string>/usr/local/bin/myscripts/iphone</string>
</array>
<!-- This optional key specifies the user to run the job as. This key
is only applicable when launchd is running as root. -->
<key>UserName</key>
<string>venj</string>
<!-- Run every ? seconds -->
<key>StartInterval</key>
<integer>1800</integer>
<!-- low priority -->
<key>Nice</key>
<integer>20</integer>
<key>LowPriorityIO</key>
<true/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment