Skip to content

Instantly share code, notes, and snippets.

@jaredbeck
Created May 1, 2011 22:07
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jaredbeck/950922 to your computer and use it in GitHub Desktop.
Save jaredbeck/950922 to your computer and use it in GitHub Desktop.
Example of launchd plist
<?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>com.gocongress.backup</string>
<!-- Contains the arguments [to exec()] used to launch your daemon.
This key is required. -->
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/jared/git/gocongress-backups/backup.sh</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>jared</string>
<!-- Run every 12 hours -->
<key>StartInterval</key>
<integer>43200</integer>
<!-- low priority -->
<key>Nice</key>
<integer>20</integer>
<key>LowPriorityIO</key>
<true/>
</dict>
</plist>
@Daemon-Devarshi
Copy link

thnx it was helpful :)

@Rustyboeing747
Copy link

Thanks I now know somewhat how to write com.apple.(name).plist files

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