Greedy task scheduler.