Evan Harmon - Memex

Launchd

Launchd is an init and operating system service management daemon created by Apple Inc. as part of macOS to replace its BSD-style init and SystemStarter. There have been efforts to port launchd to FreeBSD and derived systems.
wikipedia:: Launchd

launchd
launchctl

Apple defines a LaunchDaemon as a general background service, without any form of GUI. Specifically, LaunchDaemons are not allowed to connect to the macOS window server. LaunchAgents do have access to the GUI, and to other system features such as locating the current user’s Home folder, but generally have more limited interfaces than do regular apps.

HowTo

  • Create a plist file to define an Apple launchd/launchctl service to run a script or launch apps, etc.
    • [Harmon Ops - updateMac example](Harmon Ops - updateMac example)
  • This file needs to be copied to /Users/evan/Library/LaunchAgents
  • Enable
    • launchctl load /Users/evan/Library/LaunchAgents/com.evan.updateMac.plist
  • Disable
    • launchctl disable /Users/evan/Library/LaunchAgents/com.evan.updateMac.plist

Commands

  • launchctl
    • list
    • start
    • stop
    • enable
    • disable
    • reboot
    • kickstart
    • kill

Tools

Sources

Launchd
Interactive graph
On this page
Launchd
HowTo
Commands
Tools
Sources