Class DailyTimeIntervalMonthScheduleBuilder

java.lang.Object
org.quartz.ScheduleBuilder<DailyTimeIntervalMonthTrigger>
cn.sinozg.applet.quartz.use.ext.DailyTimeIntervalMonthScheduleBuilder

public class DailyTimeIntervalMonthScheduleBuilder extends org.quartz.ScheduleBuilder<DailyTimeIntervalMonthTrigger>
Since:
2024-01-15 14:35
Author:
xieyubin
  • Field Details

    • interval

      private int interval
    • intervalUnit

      private org.quartz.DateBuilder.IntervalUnit intervalUnit
    • daysOfMonth

      private Set<Integer> daysOfMonth
    • startTimeOfDay

      private org.quartz.TimeOfDay startTimeOfDay
    • endTimeOfDay

      private org.quartz.TimeOfDay endTimeOfDay
    • repeatCount

      private int repeatCount
    • misfireInstruction

      private int misfireInstruction
    • ALL_DAYS_OF_THE_MONTH

      public static final Set<Integer> ALL_DAYS_OF_THE_MONTH
      A set of all days of the week.

      The set contains all values between (the integers from 1 through 31).

    • STARTING_DAILY

      private static final org.quartz.TimeOfDay STARTING_DAILY
    • ENDING_DAILY

      private static final org.quartz.TimeOfDay ENDING_DAILY
  • Constructor Details

    • DailyTimeIntervalMonthScheduleBuilder

      protected DailyTimeIntervalMonthScheduleBuilder()
  • Method Details

    • dailyTimeIntervalSchedule

      public static DailyTimeIntervalMonthScheduleBuilder dailyTimeIntervalSchedule()
      Create a DailyTimeIntervalScheduleBuilder.
      Returns:
      the new DailyTimeIntervalScheduleBuilder
    • build

      public org.quartz.spi.MutableTrigger build()
      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.
      Specified by:
      build in class org.quartz.ScheduleBuilder<DailyTimeIntervalMonthTrigger>
      See Also:
      • TriggerBuilder.withSchedule(ScheduleBuilder)
    • withInterval

      public DailyTimeIntervalMonthScheduleBuilder withInterval(int timeInterval, org.quartz.DateBuilder.IntervalUnit unit)
      Specify the time unit and interval for the Trigger to be produced.
      Parameters:
      timeInterval - the interval at which the trigger should repeat.
      unit - the time unit (IntervalUnit) of the interval. The only intervals that are valid for this type of trigger are DateBuilder.IntervalUnit.SECOND, DateBuilder.IntervalUnit.MINUTE, and DateBuilder.IntervalUnit.HOUR.
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
      See Also:
      • DailyTimeIntervalTrigger.getRepeatInterval()
      • DailyTimeIntervalTrigger.getRepeatIntervalUnit()
    • withIntervalInSeconds

      public DailyTimeIntervalMonthScheduleBuilder withIntervalInSeconds(int intervalInSeconds)
      Specify an interval in the IntervalUnit.SECOND that the produced Trigger will repeat at.
      Parameters:
      intervalInSeconds - the number of seconds at which the trigger should repeat.
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
      See Also:
      • DailyTimeIntervalTrigger.getRepeatInterval()
      • DailyTimeIntervalTrigger.getRepeatIntervalUnit()
    • withIntervalInMinutes

      public DailyTimeIntervalMonthScheduleBuilder withIntervalInMinutes(int intervalInMinutes)
      Specify an interval in the IntervalUnit.MINUTE that the produced Trigger will repeat at.
      Parameters:
      intervalInMinutes - the number of minutes at which the trigger should repeat.
      Returns:
      the updated CalendarIntervalScheduleBuilder
      See Also:
      • DailyTimeIntervalTrigger.getRepeatInterval()
      • DailyTimeIntervalTrigger.getRepeatIntervalUnit()
    • withIntervalInHours

      public DailyTimeIntervalMonthScheduleBuilder withIntervalInHours(int intervalInHours)
      Specify an interval in the IntervalUnit.HOUR that the produced Trigger will repeat at.
      Parameters:
      intervalInHours - the number of hours at which the trigger should repeat.
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
      See Also:
      • DailyTimeIntervalTrigger.getRepeatInterval()
      • DailyTimeIntervalTrigger.getRepeatIntervalUnit()
    • onDaysOfTheMonth

      public DailyTimeIntervalMonthScheduleBuilder onDaysOfTheMonth(Set<Integer> onDaysOfMonth)
      Set the trigger to fire on the given days of the month.
      Parameters:
      onDaysOfMonth - a
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
    • onDaysOfTheMonth

      public DailyTimeIntervalMonthScheduleBuilder onDaysOfTheMonth(Integer... onDaysOfMonth)
      Set the trigger to fire on the given days of the month.
      Parameters:
      onDaysOfMonth - a
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
    • onEveryDay

      Set the trigger to fire on all days of the month.
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
    • startingDailyAt

      public DailyTimeIntervalMonthScheduleBuilder startingDailyAt(org.quartz.TimeOfDay timeOfDay)
      Set the trigger to begin firing each day at the given time.
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
    • endingDailyAt

      public DailyTimeIntervalMonthScheduleBuilder endingDailyAt(org.quartz.TimeOfDay timeOfDay)
      Set the startTimeOfDay for this trigger to end firing each day at the given time.
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
    • endingDailyAfterCount

      public DailyTimeIntervalMonthScheduleBuilder endingDailyAfterCount(int count)
      Calculate and set the endTimeOfDay using count, interval and starTimeOfDay. This means that these must be set before this method is call.
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
    • withMisfireHandlingInstructionIgnoreMisfires

      public DailyTimeIntervalMonthScheduleBuilder withMisfireHandlingInstructionIgnoreMisfires()
      If the Trigger misfires, use the Trigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY instruction.
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
      See Also:
      • Trigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY
    • withMisfireHandlingInstructionDoNothing

      public DailyTimeIntervalMonthScheduleBuilder withMisfireHandlingInstructionDoNothing()
      If the Trigger misfires, use the DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_DO_NOTHING instruction.
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
      See Also:
      • DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_DO_NOTHING
    • withMisfireHandlingInstructionFireAndProceed

      public DailyTimeIntervalMonthScheduleBuilder withMisfireHandlingInstructionFireAndProceed()
      If the Trigger misfires, use the DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW instruction.
      Returns:
      the updated DailyTimeIntervalScheduleBuilder
      See Also:
      • DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW
    • withRepeatCount

      public DailyTimeIntervalMonthScheduleBuilder withRepeatCount(int repeatCount)
      Set number of times for interval to repeat.

      Note: if you want total count = 1 (at start time) + repeatCount

      Returns:
      the new DailyTimeIntervalScheduleBuilder
    • validateInterval

      private void validateInterval(int timeInterval)