Search in sources :

Example 1 with PeriodIntervalTrigger

use of org.motechproject.scheduler.trigger.PeriodIntervalTrigger in project motech by motech.

the class SchedulableJobBuilder method buildRepeatingPeriodSchedulableJob.

private static SchedulableJob buildRepeatingPeriodSchedulableJob(Trigger trigger, JobDataMap dataMap) {
    PeriodIntervalTrigger periodTrigger = (PeriodIntervalTrigger) trigger;
    RepeatingPeriodSchedulableJob job = new RepeatingPeriodSchedulableJob();
    job.setEndDate(getEndDate(periodTrigger));
    job.setRepeatPeriod(periodTrigger.getRepeatPeriod());
    job.setIgnorePastFiresAtStart(dataMap.getBoolean(IGNORE_PAST_FIRES_AT_START));
    job.setUseOriginalFireTimeAfterMisfire(dataMap.getBoolean(USE_ORIGINAL_FIRE_TIME_AFTER_MISFIRE));
    return job;
}
Also used : RepeatingPeriodSchedulableJob(org.motechproject.scheduler.contract.RepeatingPeriodSchedulableJob) PeriodIntervalTrigger(org.motechproject.scheduler.trigger.PeriodIntervalTrigger)

Aggregations

RepeatingPeriodSchedulableJob (org.motechproject.scheduler.contract.RepeatingPeriodSchedulableJob)1 PeriodIntervalTrigger (org.motechproject.scheduler.trigger.PeriodIntervalTrigger)1