Urgent.News

What's breaking now, across thousands of outlets.

Tech

4 Ways a 'Retired' launchd Job Kept Running on a 160+ Job Fleet — and the 3 Commands That Actually Stop It

I run more than 160 launchd jobs on a Mac that almost never reboots. That fleet is what carried me from a ¥100k/month student side gig to ¥600k juggling multiple jobs, back down to zero after a layoff, and then — six months of rebuilding a Claude Code autonomous setup later — past ¥1.2M/month in revenue. Keeping that automation alive has taught me something I didn't expect: cleanly stopping a job…

A retired launchd job on a Mac with numerous jobs can remain active due to how launchd identifies and loads jobs. The file name, not the label within the plist, determines which job launchd manages. For instance, a file named `com.shun.zenn-daily.plist.retired` retains the label `com.shun.zenn-daily`, causing launchd to continue executing the job even after renaming the file.

Launchd does not automatically remove entries for jobs removed from the LaunchAgents/ directory, as it only reloads or unloads jobs based on their labels, not file paths. This behavior becomes problematic on long-running Macs without reboots, as renamed jobs continue to function. To properly retire a launchd job, one must first unload it using a specific command sequence.

Incorrectly retiring jobs can result in resource consumption and unnoticed failures, especially within large fleets, potentially causing disruptions and inefficiencies in automated workflows.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Thursday 17 September →