public static OperableTrigger newTrigger(Map<String, Object> attrMap) throws ParseException { CronTriggerImpl result = new CronTriggerImpl(); result.setCronExpression((String) attrMap.get("cronExpression")); if(attrMap.containsKey("timeZone")) { result.setTimeZone(TimeZone.getTimeZone((String)attrMap.get("timeZone"))); } TriggerSupport.initializeTrigger(result, attrMap); return result; } }
@Override public Object clone() { CronTriggerImpl copy = (CronTriggerImpl) super.clone(); if (cronEx != null) { copy.setCronExpression(new CronExpression(cronEx)); } return copy; }
@Override public Object clone() { CronTriggerImpl copy = (CronTriggerImpl) super.clone(); if (cronEx != null) { copy.setCronExpression(new CronExpression(cronEx)); } return copy; }
/** * <p> * Create a <code>CronTrigger</code> with the given name, group and * expression. * </p> * * <p> * The start-time will also be set to the current time, and the time zone * will be set the the system's default time zone. * </p> * * @deprecated use a TriggerBuilder instead */ @Deprecated public CronTriggerImpl(String name, String group, String cronExpression) throws ParseException { super(name, group); setCronExpression(cronExpression); setStartTime(new Date()); setTimeZone(TimeZone.getDefault()); }
/** * <p> * Create a <code>CronTrigger</code> with the given name, group and * expression. * </p> * * <p> * The start-time will also be set to the current time, and the time zone * will be set the the system's default time zone. * </p> * * @deprecated use a TriggerBuilder instead */ @Deprecated public CronTriggerImpl(String name, String group, String cronExpression) throws ParseException { super(name, group); setCronExpression(cronExpression); setStartTime(new Date()); setTimeZone(TimeZone.getDefault()); }
public static OperableTrigger newTrigger(CompositeData cData) throws ParseException { CronTriggerImpl result = new CronTriggerImpl(); result.setCronExpression((String) cData.get("cronExpression")); if(cData.containsKey("timeZone")) { result.setTimeZone(TimeZone.getTimeZone((String)cData.get("timeZone"))); } TriggerSupport.initializeTrigger(result, cData); return result; }
super(name, group, jobName, jobGroup); setCronExpression(cronExpression);
super(name, group, jobName, jobGroup); setCronExpression(cronExpression);
cti.setCronExpression(this.cronExpression); cti.setTimeZone(this.timeZone); cti.setCalendarName(this.calendarName);
/** * Build the actual Trigger -- NOT intended to be invoked by end users, but * will rather be invoked by a TriggerBuilder which this ScheduleBuilder is * given to. * * @see TriggerBuilder#withSchedule(ScheduleBuilder) */ @Override public MutableTrigger build() { CronTriggerImpl ct = new CronTriggerImpl(); ct.setCronExpression(cronExpression); ct.setTimeZone(cronExpression.getTimeZone()); ct.setMisfireInstruction(misfireInstruction); return ct; }
/** * Build the actual Trigger -- NOT intended to be invoked by end users, but * will rather be invoked by a TriggerBuilder which this ScheduleBuilder is * given to. * * @see TriggerBuilder#withSchedule(ScheduleBuilder) */ @Override public MutableTrigger build() { CronTriggerImpl ct = new CronTriggerImpl(); ct.setCronExpression(cronExpression); ct.setTimeZone(cronExpression.getTimeZone()); ct.setMisfireInstruction(misfireInstruction); return ct; }
super(name, group, jobName, jobGroup); setCronExpression(cronExpression);
super(name, group, jobName, jobGroup); setCronExpression(cronExpression);
cti.setCronExpression(this.cronExpression); cti.setTimeZone(this.timeZone); cti.setCalendarName(this.calendarName);
try { CronTriggerImpl cron = new CronTriggerImpl(); cron.setStartTime(new Date()); cron.setCronExpression("0 0/0 * * * ?"); BaseCalendar calendar = new BaseCalendar(); List<Date> result = TriggerUtils.computeFireTimesBetween(cron, calendar, new Date(),DateBuilder.futureDate(1, IntervalUnit.DAY)); for (Date date : result) { System.out.println(date); } } catch (ParseException e) { e.printStackTrace(); }
public static OperableTrigger newTrigger(Map<String, Object> attrMap) throws ParseException { CronTriggerImpl result = new CronTriggerImpl(); result.setCronExpression((String) attrMap.get("cronExpression")); if(attrMap.containsKey("timeZone")) { result.setTimeZone(TimeZone.getTimeZone((String)attrMap.get("timeZone"))); } TriggerSupport.initializeTrigger(result, attrMap); return result; } }
private Trigger buildHeartJobTrigger() { CronTriggerImpl trigger=new CronTriggerImpl(); trigger.setName("UfloHeartJobTrigger"); try { trigger.setCronExpression(heartJobCronExpression); return trigger; } catch (ParseException e) { throw new RuntimeException(e); } }
@Override public List<Date> getExecTimes(String cron, int number) { try { CronTriggerImpl cronTriggerImpl = new CronTriggerImpl(); cronTriggerImpl.setCronExpression(cron); return computeFireTimesBetween(cronTriggerImpl, null, new Date(), new DateTime().plusYears(5).toDate(), number); } catch (Exception e) { throw new BusinessException(e.getMessage(), e, 500); } }
public static OperableTrigger newTrigger(CompositeData cData) throws ParseException { CronTriggerImpl result = new CronTriggerImpl(); result.setCronExpression((String) cData.get("cronExpression")); if(cData.containsKey("timeZone")) { result.setTimeZone(TimeZone.getTimeZone((String)cData.get("timeZone"))); } TriggerSupport.initializeTrigger(result, cData); return result; }
private Trigger initTrigger(){ CronTriggerImpl trigger=new CronTriggerImpl(); trigger.setName("UfloHeartbeatTrigger"); trigger.setKey(new TriggerKey("UfloHeartbeatTrigger")); try { trigger.setCronExpression(detectionCron); return trigger; } catch (ParseException e1) { throw new RuntimeException(e1); } }