Updated scheduling to be more efficient, now waits until an individual
task is finished before cleaning and adding more tasks.