Code RoomReplicated cron scheduler
HardPrep Room Coding #4274

Replicated cron scheduler

Vibe & agenticConcurrencyDistributed systemsSenior–Staff~26 min

Greenfield Go service with an AI agent: a scheduled-task runner that executes recurring jobs (cron expressions) like 'send the daily digest at 9am' and 'reconcile invoices hourly', deployed across 3 replicas for HA. Describe the build plan: how you parse/evaluate schedules, ensure each run fires once despite multiple replicas, handle missed runs, and the acceptance criteria. What does a careless 'run these jobs on a schedule' prompt get wrong in a replicated deployment?

Implement
claim_scheduled_runs(job_ids: list[str], scheduled_minutes: list[int], now_minute: int, max_lateness_minutes: int) → list[str]
Examples
in[["digest","digest","digest"],[540,540,540],540,5]out["run","skip_duplicate","skip_duplicate"]
in[["digest","invoices"],[540,600],601,5]out["skip_stale","run"]
in[["digest"],[540],500,5]out["skip_early"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 26 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.