Sunday, 1 April 2018

OIM API - Code Snippet to trigger OIM Scheduled Job.

public void triggerScheduledJob(String jobName){
    final String logp = CN + " :: triggerScheduledJob - ";
    LOGGER.debug(logp + "START");
    SchedulerService schedulerService = null;
   
    try {
        //get scheduler service
        schedulerService = Platform.getService(SchedulerService.class);
       
        schedulerService.triggerNow(jobName);
        LOGGER.info(logp + jobName + " invoked successfully");
    }catch(Exception e){
        LOGGER.error(logp + "Exception while invoking scheduled job - " + e, e);
    }

    LOGGER.debug(logp + "END");
}


Happy Learning!!!

No comments:

Post a Comment