Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

15 launchd Jobs and One Quota Circuit Breaker: Deciding What to Re-run Once the Circuit Closes

Description and use

quota‑catchup.py automatically re‑runs launchd jobs that were skipped due to quota exhaustion, ensuring no daily executions are missed after the circuit closes.

Problem

When a quota circuit breaker halts launchd jobs, the skipped jobs never automatically resume after the circuit closes, causing missed executions.

Outcome

All previously skipped jobs are re‑executed promptly after quota recovery, preventing missed daily runs and ensuring consistent job completion.

Workflow

  • 1. Run claude-quota-guard.py to monitor quota and skip jobs when necessary.
  • 2. When quota recovers, launchd resumes normal scheduling but skipped jobs stay idle until next slot.
  • 3. Execute quota-catchup.py to scan all launch agent plists.
  • 4. For each plist, check if it is guarded, if today’s latest marker is SKIPPED, and if any StartCalendarInterval slot has passed today.
  • 5. Collect candidates that satisfy all three conditions.
  • 6. Re‑run each candidate job immediately (e.g., via launchctl start or direct execution).

Evidence

The guard sits in front of 15 of the plists under ~/Library/LaunchAgents/*.plist.

Source

If the 9:00 AM job was skipped for quota reasons and the quota recovers at 10:00, but the next slot is 9:00 AM tomorrow, you've lost an entire day's execution.

Source

  • Record date: 2026-09-21T17:00:12.510Z