Design Distributed Cron
MediumSystem design · Scheduling
Design a distributed cron service: users define recurring jobs (cron expressions with a time zone) and the system triggers each occurrence on a fleet of runners. Focus on firing every occurrence exactly once at the decision level even when schedulers crash or lose leadership, on missed-run and overlap policies, and on time zone and daylight saving behaviour. This is about time-based recurrence; a general task queue with delays and dependency graphs are separate questions.
Requirements
- No duplicate and no silently missed occurrence under scheduler failure or leader failover
- Support time zones, daylight saving, retries and manual triggers
- Define what happens to occurrences missed during an outage and to overlapping runs
- Track run history and alert on failure and on runs that never started