Add possibility of changing the TaskManager inside the scheduler.