use of com.netflix.fenzo.triggers.exceptions.SchedulerException in project mantis by Netflix.
the class SLA method initCron.
// caller must lock to avoid concurrent access with destroyCron()
private void initCron(NamedJob job) throws SchedulerException {
if (!hasCronSpec || triggerId != null)
return;
logger.info("Init'ing cron for " + job.getName());
triggerGroup = job.getName() + "-" + this;
try {
scheduledTrigger = new CronTrigger<>(cronSpec, job.getName(), job, NamedJob.class, NamedJob.CronTriggerAction.class);
triggerId = triggerOperator.registerTrigger(triggerGroup, scheduledTrigger);
} catch (IllegalArgumentException e) {
throw new SchedulerException(e.getMessage(), e);
}
}
Aggregations