scheduler/src/main/java/com/cognitree/kronos/scheduler/TaskSchedulerService.java
/**
     * Task scheduler service is started in an order to get back to the last known state
     * Initialization order:
     * <pre>
     * 1) Initialize task provider
     * 2) Subscribe for task status update
     * 3) Initialize configured timeout policies
     * 4) Initialize timeout task for all the active tasks
     * 5) Schedule tasks ready for execution
     * </pre>
     */
Task scheduler service is started in an order to get back to the last known state
Initialization order:

1) Initialize task provider
2) Subscribe for task status update
3) Initialize configured timeout policies
4) Initialize timeout task for all the active tasks
5) Schedule tasks ready for execution

Task scheduler service is started in an order to get back to the last known state Initialization order : 1 ) Initialize task provider 2 ) Subscribe for task status update 3 ) Initialize configured timeout policies 4 ) Initialize timeout task for all the active tasks 5 ) Schedule tasks ready for execution
@Override
    public void start() throws Exception {
        logger.info("Starting task scheduler service");
        reInitTaskProvider();
        startConsumer();
        startTimeoutTasks();
        resolveCreatedTasks();
        scheduledExecutorService.scheduleAtFixedRate(this::deleteStaleTasks, TASK_PURGE_INTERVAL, TASK_PURGE_INTERVAL, HOURS);
        ServiceProvider.registerService(this);
        scheduleReadyTasks();
    }
@ Override public void start ( ) throws Exception { logger . info ( "Starting task scheduler service" ) ; reInitTaskProvider ( ) ; startConsumer ( ) ; startTimeoutTasks ( ) ; resolveCreatedTasks ( ) ; scheduledExecutorService . scheduleAtFixedRate ( this :: deleteStaleTasks , TASK_PURGE_INTERVAL , TASK_PURGE_INTERVAL , HOURS ) ; ServiceProvider . registerService ( this ) ; scheduleReadyTasks ( ) ; }
Task scheduler service is started in an order to get back to the last known state
 Initialization order:
 <pre>
 1) Initialize task provider
 2) Subscribe for task status update
 3) Initialize configured timeout policies
 4) Initialize timeout task for all the active tasks
 5) Schedule tasks ready for execution
 </pre>
Task scheduler service is started in an order to get back to the last known state Initialization order : <pre > 1 ) Initialize task provider 2 ) Subscribe for task status update 3 ) Initialize configured timeout policies 4 ) Initialize timeout task for all the active tasks 5 ) Schedule tasks ready for execution < / pre >