Dev.to
7/19/2026

It Can Die in Its Sleep — Self-Healing launchd Jobs with Multi-Slot Firing and a Done-Marker
Short summary
A practical pattern for making macOS launchd jobs self-healing by using multiple StartCalendarInterval firing slots and done-markers to retry failed runs until success. The author uses this to run Claude Code ingest jobs on an Obsidian vault that frequently die from sleep, network issues, or timeouts. Half-markers per pipeline step allow partial retries without repeating already-successful work.
- •Multiple launchd calendar slots fire throughout the day; a done-marker makes later slots no-op if an earlier one succeeded
- •Half-markers per step enable partial retries — only failed steps re-run on the next slot
- •Pattern handles macOS sleep, post-wake network gaps, and Claude API timeouts gracefully
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



