#launchd
Usage
I have a bash script called foo.sh
that takes one command line argument, bar
. I want it to run every 60
seconds and load at startup.
- an XML
plist
is Apple Property List com.mydomain.foo.plist
Name of launchd plist file should be a reverse fqdn, like (this may not be required, but convention)com.mydomain.foo.plist
lives in$HOME/Library/LaunchAgents
and is ran as that user.com.mydomain.foo.plist
can also live/Library/LaunchDaemons
or/Library/LaunchAgents
, have requirements, ran asroot
- Load
plist
withlaunchctl load com.mydomain.foo.plist
- Unload
plist
withlauchctl unload com.mydomain.foo.plist