Google interview question

design a scheduler in python