@Override public Trigger getTrigger() { return newTrigger() .withIdentity(this.getClass().getSimpleName()) .withSchedule(simpleSchedule() .withIntervalInHours(1) .repeatForever()) .build(); }
/** * Create a SimpleScheduleBuilder set to repeat the given number * of times - 1 with a 1 minute interval. * * <p>Note: Total count = 1 (at start time) + repeat count</p> * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatMinutelyForTotalCount(int count) { if(count < 1) throw new IllegalArgumentException("Total count of firings must be at least one! Given count: " + count); return simpleSchedule() .withIntervalInMinutes(1) .withRepeatCount(count - 1); }
/** * Create a SimpleScheduleBuilder set to repeat the given number * of times - 1 with a 1 hour interval. * * <p>Note: Total count = 1 (at start time) + repeat count</p> * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatHourlyForTotalCount(int count) { if(count < 1) throw new IllegalArgumentException("Total count of firings must be at least one! Given count: " + count); return simpleSchedule() .withIntervalInHours(1) .withRepeatCount(count - 1); }
/** * Create a SimpleScheduleBuilder set to repeat forever with a 1 hour interval. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatHourlyForever() { return simpleSchedule() .withIntervalInHours(1) .repeatForever(); }
/** * Create a SimpleScheduleBuilder set to repeat forever with an interval * of the given number of hours. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatHourlyForever(int hours) { return simpleSchedule() .withIntervalInHours(hours) .repeatForever(); }
/** * Create a SimpleScheduleBuilder set to repeat the given number * of times - 1 with an interval of the given number of seconds. * * <p>Note: Total count = 1 (at start time) + repeat count</p> * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatSecondlyForTotalCount(int count, int seconds) { if(count < 1) throw new IllegalArgumentException("Total count of firings must be at least one! Given count: " + count); return simpleSchedule() .withIntervalInSeconds(seconds) .withRepeatCount(count - 1); }
/** * Create a SimpleScheduleBuilder set to repeat the given number * of times - 1 with an interval of the given number of hours. * * <p>Note: Total count = 1 (at start time) + repeat count</p> * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatHourlyForTotalCount(int count, int hours) { if(count < 1) throw new IllegalArgumentException("Total count of firings must be at least one! Given count: " + count); return simpleSchedule() .withIntervalInHours(hours) .withRepeatCount(count - 1); }
/** * Create a SimpleScheduleBuilder set to repeat the given number * of times - 1 with an interval of the given number of hours. * * <p>Note: Total count = 1 (at start time) + repeat count</p> * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatHourlyForTotalCount(int count, int hours) { if(count < 1) throw new IllegalArgumentException("Total count of firings must be at least one! Given count: " + count); return simpleSchedule() .withIntervalInHours(hours) .withRepeatCount(count - 1); }
/** * Create a SimpleScheduleBuilder set to repeat the given number * of times - 1 with an interval of the given number of minutes. * * <p>Note: Total count = 1 (at start time) + repeat count</p> * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatMinutelyForTotalCount(int count, int minutes) { if(count < 1) throw new IllegalArgumentException("Total count of firings must be at least one! Given count: " + count); return simpleSchedule() .withIntervalInMinutes(minutes) .withRepeatCount(count - 1); }
/** * Create a SimpleScheduleBuilder set to repeat the given number * of times - 1 with a 1 second interval. * * <p>Note: Total count = 1 (at start time) + repeat count</p> * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatSecondlyForTotalCount(int count) { if(count < 1) throw new IllegalArgumentException("Total count of firings must be at least one! Given count: " + count); return simpleSchedule() .withIntervalInSeconds(1) .withRepeatCount(count - 1); }
/** * Create a SimpleScheduleBuilder set to repeat forever with an interval * of the given number of minutes. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatMinutelyForever(int minutes) { return simpleSchedule() .withIntervalInMinutes(minutes) .repeatForever(); }
/** * Create a SimpleScheduleBuilder set to repeat forever with a 1 second interval. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatSecondlyForever() { return simpleSchedule() .withIntervalInSeconds(1) .repeatForever(); }
/** * Create a SimpleScheduleBuilder set to repeat forever with a 1 second interval. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatSecondlyForever() { return simpleSchedule() .withIntervalInSeconds(1) .repeatForever(); }
/** * Create a SimpleScheduleBuilder set to repeat forever with a 1 minute interval. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatMinutelyForever() { return simpleSchedule() .withIntervalInMinutes(1) .repeatForever(); }
/** * Create a SimpleScheduleBuilder set to repeat forever with an interval * of the given number of minutes. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatMinutelyForever(int minutes) { return simpleSchedule() .withIntervalInMinutes(minutes) .repeatForever(); }
/** * Create a SimpleScheduleBuilder set to repeat forever with a 1 hour interval. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatHourlyForever() { return simpleSchedule() .withIntervalInHours(1) .repeatForever(); }
/** * Create a SimpleScheduleBuilder set to repeat forever with a 1 minute interval. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatMinutelyForever() { return simpleSchedule() .withIntervalInMinutes(1) .repeatForever(); }
/** * Create a SimpleScheduleBuilder set to repeat forever with an interval * of the given number of seconds. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatSecondlyForever(int seconds) { return simpleSchedule() .withIntervalInSeconds(seconds) .repeatForever(); }
/** * Create a SimpleScheduleBuilder set to repeat forever with an interval * of the given number of hours. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatHourlyForever(int hours) { return simpleSchedule() .withIntervalInHours(hours) .repeatForever(); }
/** * Create a SimpleScheduleBuilder set to repeat forever with an interval * of the given number of seconds. * * @return the new SimpleScheduleBuilder */ public static SimpleScheduleBuilder repeatSecondlyForever(int seconds) { return simpleSchedule() .withIntervalInSeconds(seconds) .repeatForever(); }