Implemented a TaskManager.restart functionality