Renaming a launchd Plist File Does Not Stop the Job — Here Is Why
A developer managing over 160 macOS launchd automation jobs discovered that renaming a plist file to a '.retired' extension does not actually stop the job from running. This happens because launchd identifies jobs by the Label key inside the plist file, not by the file's name or path, so once a job is loaded into launchd's internal table it continues to run regardless of any rename. Unlike Linux's systemd, which ties service identity to the unit file path, macOS launchd treats the file path only as an initial loading source and manages everything thereafter via the Label value. A rename is interpreted by the OS as a delete-and-add event, but files without a .plist extension are ignored by launchd's directory watcher on macOS 13 and later, meaning the already-loaded job entry is never automatically removed. On machines that run for long periods without a reboot, this behavior can cause supposedly retired scheduled jobs to keep executing silently in the background.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in