Use the cancel_job from the Scheduler class

small refactoring