Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.