Search in sources :

Example 1 with SchedulerException

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);
    }
}
Also used : NamedJob(io.mantisrx.server.master.store.NamedJob) SchedulerException(com.netflix.fenzo.triggers.exceptions.SchedulerException)

Aggregations

SchedulerException (com.netflix.fenzo.triggers.exceptions.SchedulerException)1 NamedJob (io.mantisrx.server.master.store.NamedJob)1