Preparing your design workspace

Loading the problem and your saved attempt…

Design an In-Memory Job Scheduler

Model a thread-safe scheduler for delayed and recurring jobs with cancellation, rescheduling, and controlled execution.

Design an in-memory job scheduler library. Callers register a named handler, schedule a one-time or fixed-delay job, cancel or reschedule a pending job, and shut the scheduler down gracefully.

For this exercise, assume one process, one monotonic clock abstraction, up to 100,000 pending jobs, and a configurable worker pool. A recurring job schedules its next run only after the current run finishes, the same job must never execute concurrently with itself, and process crashes may lose all state.

Explain any additional assumptions before choosing classes and contracts.