Design a Task Scheduler — Medium System Design Problem