Moving the taskscheduler to run the tasks from sc