expr.second("*/7");
protected void setString(final AutoTimer timer, final String value) { timer.getScheduleExpression().second(value); } },
@PostConstruct public void initialize() { ScheduleExpression scheduleExpression = new ScheduleExpression() .hour("*") .minute("*") .second("*/5"); TimerConfig timerConfig = new TimerConfig(); timerConfig.setInfo("Every 5 second timer"); timerService.createCalendarTimer(scheduleExpression, timerConfig); }
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.second(builder.scheduleExprSecond); s.minute(builder.scheduleExprMinute); s.hour(builder.scheduleExprHour);
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.minute(schedule.getMinute()); scheduleExpression.month(schedule.getMonth()); scheduleExpression.second(schedule.getSecond()); scheduleExpression.year(schedule.getYear());
public ScheduleExpression second(int second) { return second(Integer.toString(second)); }
protected void setString(final AutoTimer timer, final String value) { timer.getScheduleExpression().second(value); } },
@PostConstruct public void init() { timerService.createCalendarTimer(new ScheduleExpression().second("*/1") .minute("*").hour("*")); }
@PostConstruct public void configure() { if (DeploymentSynchronizer.DEPLOY_SYNC_ENABLED) { ScheduleExpression schedule = new ScheduleExpression(); schedule.hour("*"); schedule.minute("*"); schedule.second("*/" + DeploymentSynchronizer.DEPLOY_SYNC_INTERVAL); timer = timerService.createCalendarTimer(schedule, new TimerConfig(null, false)); } }
public void register(final String clientId) { sendMessage(REGISTER_ENDPOINT, applicationConfig.toJSON()); ScheduleExpression schedule = new ScheduleExpression(); schedule.second("*/10").minute("*").hour("*").start(Calendar.getInstance().getTime()); TimerConfig config = new TimerConfig(); config.setPersistent(false); Timer timer = timerService.createCalendarTimer(schedule, config); LOGGER.config(() -> timer.getSchedule().toString()); }
public void register(final String clientId) { sendMessage(REGISTER_ENDPOINT, applicationConfig.toJSON()); ScheduleExpression schedule = new ScheduleExpression(); schedule.second("*/10").minute("*").hour("*").start(Calendar.getInstance().getTime()); TimerConfig config = new TimerConfig(); config.setPersistent(false); Timer timer = timerService.createCalendarTimer(schedule, config); LOGGER.config(() -> timer.getSchedule().toString()); }
@PostConstruct public void configure() { DeploymentStore store = new DeploymentStore(); store.setCommandService(commandService); setDeploymentStore(store); if (DEPLOY_SYNC_ENABLED) { ScheduleExpression schedule = new ScheduleExpression(); schedule.hour("*"); schedule.minute("*"); schedule.second("*/" + DEPLOY_SYNC_INTERVAL); timer = timerService.createCalendarTimer(schedule, new TimerConfig(null, false)); } }
public ScheduleExpression getScheduleExpression() { return new ScheduleExpression(). second(second_). minute(minute_). hour(hour_). dayOfMonth(dayOfMonth_). month(month_). dayOfWeek(dayOfWeek_). year(year_). timezone(timezone_). start(start_). end(end_); }
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; }
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; }