Skip to content

Instantly share code, notes, and snippets.

@ccorcos
Last active November 4, 2023 22:05
Show Gist options
  • Save ccorcos/62858fda9d22efd315af76d4bb50c4e3 to your computer and use it in GitHub Desktop.
Save ccorcos/62858fda9d22efd315af76d4bb50c4e3 to your computer and use it in GitHub Desktop.
Simple launchd template
<?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.demo.daemon.plist</string>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>20</integer>
<key>StandardErrorPath</key>
<string>/Users/chet/demo/stderr.log</string>
<key>StandardOutPath</key>
<string>/Users/chet/demo/stdout.log</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string><![CDATA[/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin]]></string>
</dict>
<key>WorkingDirectory</key>
<string>/Users/chet/demo</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/node</string>
<string>main.js</string>
</array>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment