use of org.motechproject.scheduler.util.CronExpressionUtil in project motech by motech.
the class SchedulableJobBuilder method buildDayOfWeekSchedulableJob.
private static SchedulableJob buildDayOfWeekSchedulableJob(Trigger trigger, JobDataMap dataMap) {
CronTrigger cronTrigger = (CronTrigger) trigger;
DayOfWeekSchedulableJob job = new DayOfWeekSchedulableJob();
job.setEndDate(getEndDate(trigger));
job.setIgnorePastFiresAtStart(dataMap.getBoolean(IGNORE_PAST_FIRES_AT_START));
CronExpressionUtil cronExpressionUtil = new CronExpressionUtil(cronTrigger.getCronExpression());
job.setTime(cronExpressionUtil.getTime());
job.setDays(cronExpressionUtil.getDaysOfWeek());
return job;
}
Aggregations