public ScheduleExpression getScheduleExpression() { if (this.scheduleExpression == null) { this.scheduleExpression = new ScheduleExpression(); this.scheduleExpression.second(this.scheduleExprSecond).minute(this.scheduleExprMinute).hour(this.scheduleExprHour).dayOfWeek(this.scheduleExprDayOfWeek) .dayOfMonth(this.scheduleExprDayOfMonth).month(this.scheduleExprMonth).year(this.scheduleExprYear).timezone(this.scheduleExprTimezone) .start(this.scheduleExprStartDate).end(this.scheduleExprEndDate); } return scheduleExpression; }
s.year(builder.scheduleExprYear); s.start(builder.scheduleExprStartDate); s.end(builder.scheduleExprEndDate); s.timezone(builder.scheduleExprTimezone); this.calendarTimeout = new CalendarBasedTimeout(s);
private ScheduleExpression clone(ScheduleExpression schedule) { // clone the schedule ScheduleExpression clonedSchedule = new ScheduleExpression(); clonedSchedule.second(schedule.getSecond()); clonedSchedule.minute(schedule.getMinute()); clonedSchedule.hour(schedule.getHour()); clonedSchedule.dayOfWeek(schedule.getDayOfWeek()); clonedSchedule.dayOfMonth(schedule.getDayOfMonth()); clonedSchedule.month(schedule.getMonth()); clonedSchedule.year(schedule.getYear()); clonedSchedule.timezone(schedule.getTimezone()); clonedSchedule.start(schedule.getStart()); clonedSchedule.end(schedule.getEnd()); return clonedSchedule; }
scheduleExpression.end(timer.getEnd().getTime());
ScheduleExpression schedule = new ScheduleExpression(); schedule.start(startDate); schedule.hour("*/2"); schedule.end(endDate); Timer timer = timerService.createCalendarTimer(schedule);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd"); Date convertedDate = dateFormat.parse(confgEntry.substring(confgEntry.indexOf('=') + 1)); scheduerExpression.end(convertedDate);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd"); Date convertedDate = dateFormat.parse(confgEntry.substring(confgEntry.indexOf('=') + 1)); scheduerExpression.end(convertedDate);
public ScheduleExpression getScheduleExpression() { if (this.scheduleExpression == null) { this.scheduleExpression = new ScheduleExpression(); this.scheduleExpression.second(this.scheduleExprSecond).minute(this.scheduleExprMinute).hour(this.scheduleExprHour).dayOfWeek(this.scheduleExprDayOfWeek) .dayOfMonth(this.scheduleExprDayOfMonth).month(this.scheduleExprMonth).year(this.scheduleExprYear).timezone(this.scheduleExprTimezone) .start(this.scheduleExprStartDate).end(this.scheduleExprEndDate); } return scheduleExpression; }
private void addSchedulesToMethod(final MethodContext methodContext, final MethodScheduleInfo info) { if (methodContext == null) { return; } for (final ScheduleInfo scheduleInfo : info.schedules) { final ScheduleExpression expr = new ScheduleExpression(); expr.second(scheduleInfo.second == null ? "0" : scheduleInfo.second); expr.minute(scheduleInfo.minute == null ? "0" : scheduleInfo.minute); expr.hour(scheduleInfo.hour == null ? "0" : scheduleInfo.hour); expr.dayOfWeek(scheduleInfo.dayOfWeek == null ? "*" : scheduleInfo.dayOfWeek); expr.dayOfMonth(scheduleInfo.dayOfMonth == null ? "*" : scheduleInfo.dayOfMonth); expr.month(scheduleInfo.month == null ? "*" : scheduleInfo.month); expr.year(scheduleInfo.year == null ? "*" : scheduleInfo.year); expr.timezone(scheduleInfo.timezone); expr.start(scheduleInfo.start); expr.end(scheduleInfo.end); final TimerConfig config = new TimerConfig(); config.setInfo(scheduleInfo.info); config.setPersistent(scheduleInfo.persistent); methodContext.getSchedules().add(new ScheduleData(config, expr)); } }
private void addSchedulesToMethod(final MethodContext methodContext, final MethodScheduleInfo info) { if (methodContext == null) { return; } for (final ScheduleInfo scheduleInfo : info.schedules) { final ScheduleExpression expr = new ScheduleExpression(); expr.second(scheduleInfo.second == null ? "0" : scheduleInfo.second); expr.minute(scheduleInfo.minute == null ? "0" : scheduleInfo.minute); expr.hour(scheduleInfo.hour == null ? "0" : scheduleInfo.hour); expr.dayOfWeek(scheduleInfo.dayOfWeek == null ? "*" : scheduleInfo.dayOfWeek); expr.dayOfMonth(scheduleInfo.dayOfMonth == null ? "*" : scheduleInfo.dayOfMonth); expr.month(scheduleInfo.month == null ? "*" : scheduleInfo.month); expr.year(scheduleInfo.year == null ? "*" : scheduleInfo.year); expr.timezone(scheduleInfo.timezone); expr.start(scheduleInfo.start); expr.end(scheduleInfo.end); final TimerConfig config = new TimerConfig(); config.setInfo(scheduleInfo.info); config.setPersistent(scheduleInfo.persistent); methodContext.getSchedules().add(new ScheduleData(config, expr)); } }
.dayOfWeek(cronExpression.getDayOfWeek()).dayOfMonth( cronExpression.getDayOfMonth()).month(cronExpression.getMonth()) .year(cronExpression.getYear()).start(start).end(end); } else { throw new IllegalStateException(
private ScheduleExpression clone(ScheduleExpression schedule) { // clone the schedule ScheduleExpression clonedSchedule = new ScheduleExpression(); clonedSchedule.second(schedule.getSecond()); clonedSchedule.minute(schedule.getMinute()); clonedSchedule.hour(schedule.getHour()); clonedSchedule.dayOfWeek(schedule.getDayOfWeek()); clonedSchedule.dayOfMonth(schedule.getDayOfMonth()); clonedSchedule.month(schedule.getMonth()); clonedSchedule.year(schedule.getYear()); clonedSchedule.timezone(schedule.getTimezone()); clonedSchedule.start(schedule.getStart()); clonedSchedule.end(schedule.getEnd()); return clonedSchedule; }
public ScheduleExpression getScheduleExpression() { return new ScheduleExpression(). second(getSecond()). minute(getMinute()). hour(getHour()). dayOfMonth(getDayOfMonth()). month(getMonth()). dayOfWeek(getDayOfWeek()). year(getYear()). timezone(getTimeZoneID()). start(getStart()). end(getEnd()); }
private ScheduleExpression copy(final ScheduleExpression scheduleExpression) { final ScheduleExpression scheduleExpressionCopy = new ScheduleExpression(); scheduleExpressionCopy.year(scheduleExpression.getYear()); scheduleExpressionCopy.month(scheduleExpression.getMonth()); scheduleExpressionCopy.dayOfMonth(scheduleExpression.getDayOfMonth()); scheduleExpressionCopy.dayOfWeek(scheduleExpression.getDayOfWeek()); scheduleExpressionCopy.hour(scheduleExpression.getHour()); scheduleExpressionCopy.minute(scheduleExpression.getMinute()); scheduleExpressionCopy.second(scheduleExpression.getSecond()); scheduleExpressionCopy.start(scheduleExpression.getStart()); scheduleExpressionCopy.end(scheduleExpression.getEnd()); scheduleExpressionCopy.timezone(scheduleExpression.getTimezone()); return scheduleExpressionCopy; }
private ScheduleExpression copy(final ScheduleExpression scheduleExpression) { final ScheduleExpression scheduleExpressionCopy = new ScheduleExpression(); scheduleExpressionCopy.year(scheduleExpression.getYear()); scheduleExpressionCopy.month(scheduleExpression.getMonth()); scheduleExpressionCopy.dayOfMonth(scheduleExpression.getDayOfMonth()); scheduleExpressionCopy.dayOfWeek(scheduleExpression.getDayOfWeek()); scheduleExpressionCopy.hour(scheduleExpression.getHour()); scheduleExpressionCopy.minute(scheduleExpression.getMinute()); scheduleExpressionCopy.second(scheduleExpression.getSecond()); scheduleExpressionCopy.start(scheduleExpression.getStart()); scheduleExpressionCopy.end(scheduleExpression.getEnd()); scheduleExpressionCopy.timezone(scheduleExpression.getTimezone()); return scheduleExpressionCopy; } }
private ScheduleExpression clone(ScheduleExpression schedule) { // clone the schedule ScheduleExpression clonedSchedule = new ScheduleExpression(); clonedSchedule.second(schedule.getSecond()); clonedSchedule.minute(schedule.getMinute()); clonedSchedule.hour(schedule.getHour()); clonedSchedule.dayOfWeek(schedule.getDayOfWeek()); clonedSchedule.dayOfMonth(schedule.getDayOfMonth()); clonedSchedule.month(schedule.getMonth()); clonedSchedule.year(schedule.getYear()); clonedSchedule.timezone(schedule.getTimezone()); clonedSchedule.start(schedule.getStart()); clonedSchedule.end(schedule.getEnd()); return clonedSchedule; }
scheduleExpression.end(timer.getEnd().getTime());