Refactoring code to use jobs instead of keeping all logic in worker class
moving scheduling on error from worker to the schedule class