Move scheduling functions to TaskManager