← ClaudeAtlas

schedule-poll-orchestrator-patternlisted

Fire-ASAP orchestrator pattern for multi-track autonomous workflows dispatched via scheduled triggers (RemoteTrigger / CronCreate) rather than in-session agents. Use when: (1) a multi-track overnight workflow's orchestrator trigger has a fixed `t+Nh` timer that wastes wallclock when tracks finish early, (2) an overnight run should run consolidation/merge AS SOON AS all parallel tracks report complete, not on a clock, (3) the parent orchestrator session is too context-heavy to stay alive 12-20h and needs a scheduled successor to pick up track outputs, (4) you're choosing between "fire all tracks + one fixed-timer consolidator" vs "fire tracks + self-rescheduling polling consolidator". The polling pattern replaces a fixed wait with a cheap re-schedule loop that exits to consolidation at the first poll where all tracks report `phase: complete`. Distinct from `successor-handoff` (in-session parent polling a subagent) — this is for scheduled-trigger orchestrators that need to survive session ends.
wan-huiyan/overnight-workflows · ★ 1 · AI & Automation · score 71
Install: claude install-skill wan-huiyan/overnight-workflows
# Schedule-Poll Orchestrator Pattern ## Problem Multi-track autonomous workflows (overnight ah-ha runs, parallel research, long-running experiments) need an orchestrator that: 1. Dispatches N parallel tracks that each run 3–8h. 2. Runs consolidation/merge ONCE all tracks complete. 3. Doesn't keep a human-driven session alive for the full 12–20h. Naive pattern: dispatch tracks at `t+0`, dispatch orchestrator at fixed `t+Nh` (say, t+10h) where N is a conservative upper bound on track wallclock. Failure modes of the fixed-timer pattern: - **Idle waste when tracks finish early.** If tracks finish at t+5h but orchestrator is scheduled at t+10h, consolidation sits idle for 5h. - **Hard failure when tracks run long.** If a track takes 11h, orchestrator fires at t+10h, sees incomplete state, has to bail out. User wakes up to no consolidation + tracks still running + no retry scheduled. - **No visibility between.** User has no signal of how tracks are progressing between dispatch and fixed-timer wake-up. ## Context / Trigger Conditions This skill applies when ALL of these are true: - You have 2+ parallel tracks/subagents that run 3–12h each. - Track completion time has high variance (50%+ spread between fastest and slowest possible finish). - You're dispatching via Claude Code's `schedule` skill or equivalent (RemoteTrigger / CronCreate), NOT via in-session foreground Agent calls. - The orchestrator work (consolidation, HTML rendering, PR open) must run AFTER al