}
scheduledJobDetails.updatePreviousRunStartTime(context.getFireTime());
scheduledJobDetails.updateCurrentlyRunningStatus(false);
final ScheduledJobRunHistory runHistory = new ScheduledJobRunHistory(scheduledJobDetails, version, context.getFireTime(),
new Date(), status, errorMessage, triggerType, errorLog);
// scheduledJobDetails.addRunHistory(runHistory);
this.schedularService.saveOrUpdate(scheduledJobDetails, runHistory);