As reported: Nutanix MTS3 hiring drive (2025), round 3: a distributed job scheduler as a machine-coding problem, with the focus on thread safety and modular code. A design with a singleton scheduler, a thread pool, a map keyed by time and a
Jobinterface withrun()was judged good enough; the emphasis was on how the code is written.
Implement a job scheduler:
- Clients submit jobs to run at a given time (or after a delay), and optionally repeatedly at a fixed interval.
- Jobs run on a pool of worker threads; a slow job must not delay others.
- Jobs can be cancelled.
- The scheduler must be safe to call from many threads at once.
Write runnable, modular code with a small demo, and explain the concurrency design.