Daniel Lyons' Notes

Intro to LaunchDaemons JNUC 2021

Description

Scripting on macOS can take you a long way. But what happens when you have a great script that you want to run over and over without any interaction? A little research on the topic will most likely take you into the world of LaunchDaemons. But what IS a LaunchDaemon and what can they be used for? Most of the documentation out there is written for developers or people that already know what they are doing. But what about the total beginner (like me)? That's where this presentation comes in. I will go over the difference between LaunchDaemons and LaunchAgents, the launched framework that makes them work, the different locations where LaunchDaemons can be located, the structure of a LaunchDaemon XML file, permissions that a LaunchDaemon needs to run, and how to tell if a LaunchDaemon is running. I will also give a very simple tutorial on how to write a LaunchDaemon by hand and some of the tools that exist out there to simplify the process, and show some ways that you can use LaunchDaemons to automate your own workflow.

My Notes

0:00 Intro

1:21 My Story

3:07 What are they

4:06 Difference between demons and agents

4:46 LaunchD

6:53 Anatomy of a launch daemon

7:27 LaunchDaemon Structure

8:19 Label

8:56 Program Argument

10:20 Start Interval

12:18 Script Requirements

13:54 When Will It Run

15:06 Start Calendar Interval

16:08 Where do they live

17:19 Making your LaunchDaemon work

25:31 Troubleshooting

27:58 Outro

Transcript

Intro to LaunchDaemons JNUC 2021
Interactive graph
On this page
Description
My Notes
0:00 Intro
1:21 My Story
3:07 What are they
4:06 Difference between demons and agents
4:46 LaunchD
6:53 Anatomy of a launch daemon
7:27 LaunchDaemon Structure
8:19 Label
8:56 Program Argument
10:20 Start Interval
12:18 Script Requirements
13:54 When Will It Run
15:06 Start Calendar Interval
16:08 Where do they live
17:19 Making your LaunchDaemon work
25:31 Troubleshooting
27:58 Outro
Transcript