Mac – Create a Daemon to Load App

email me

Step 1 – Create a plist file. Save as something like com.TheAppName.plist

<?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>app.TheAppName</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/open</string>
<string>/Applications/TheAppName.app</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
<key>LaunchOnlyOnce</key>
<false/>
<key>StartInterval</key>
<integer>3600</integer><!-- seconds -->
</dict>
</plist>

Step 2 – Copy plist to /System/Library/LaunchDaemons/

Step 3 – Load the daemon

sudo launchctl load -w /System/Library/LaunchDaemons/com.TheAppName.plist

Step 4 – Log off & Log on to test