Developer Builds Quota Catchup Script to Recover Skipped launchd Jobs After API Limits Reset
A developer extended their Claude API quota circuit breaker, claude-quota-guard.py, which protects 15 launchd jobs on macOS, to address a gap that emerged after quota recovery. When the circuit breaker halts jobs during quota exhaustion, launchd does not reschedule them until their next calendar slot, potentially causing a full day of missed executions. To fix this, a companion script called quota-catchup.py was built to identify and re-run only the jobs that were skipped that day. The script applies three conditions to filter candidates: the job must be guarded by claude-quota-guard.py, must show a skipped marker from today, and must have had at least one scheduled time slot already pass. Jobs on repeating intervals are excluded since they self-recover, while calendar-scheduled jobs with missed slots are prioritised for manual re-triggering.
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