Package cn.sinozg.applet.quartz.use.ext
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 Summary
FieldsModifier and TypeFieldDescriptionA set of all days of the week.private static final org.quartz.TimeOfDayprivate org.quartz.TimeOfDayprivate intprivate org.quartz.DateBuilder.IntervalUnitprivate intprivate intprivate static final org.quartz.TimeOfDayprivate org.quartz.TimeOfDay -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.quartz.spi.MutableTriggerbuild()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.Create a DailyTimeIntervalScheduleBuilder.endingDailyAfterCount(int count) Calculate and set the endTimeOfDay using count, interval and starTimeOfDay.endingDailyAt(org.quartz.TimeOfDay timeOfDay) Set the startTimeOfDay for this trigger to end firing each day at the given time.onDaysOfTheMonth(Integer... onDaysOfMonth) Set the trigger to fire on the given days of the month.onDaysOfTheMonth(Set<Integer> onDaysOfMonth) Set the trigger to fire on the given days of the month.Set the trigger to fire on all days of the month.startingDailyAt(org.quartz.TimeOfDay timeOfDay) Set the trigger to begin firing each day at the given time.private voidvalidateInterval(int timeInterval) withInterval(int timeInterval, org.quartz.DateBuilder.IntervalUnit unit) Specify the time unit and interval for the Trigger to be produced.withIntervalInHours(int intervalInHours) Specify an interval in the IntervalUnit.HOUR that the produced Trigger will repeat at.withIntervalInMinutes(int intervalInMinutes) Specify an interval in the IntervalUnit.MINUTE that the produced Trigger will repeat at.withIntervalInSeconds(int intervalInSeconds) Specify an interval in the IntervalUnit.SECOND that the produced Trigger will repeat at.If the Trigger misfires, use theDailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_DO_NOTHINGinstruction.If the Trigger misfires, use theDailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOWinstruction.If the Trigger misfires, use theTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICYinstruction.withRepeatCount(int repeatCount) Set number of times for interval to repeat.
-
Field Details
-
interval
private int interval -
intervalUnit
private org.quartz.DateBuilder.IntervalUnit intervalUnit -
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
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
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:
buildin classorg.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 areDateBuilder.IntervalUnit.SECOND,DateBuilder.IntervalUnit.MINUTE, andDateBuilder.IntervalUnit.HOUR.- Returns:
- the updated DailyTimeIntervalScheduleBuilder
- See Also:
-
DailyTimeIntervalTrigger.getRepeatInterval()DailyTimeIntervalTrigger.getRepeatIntervalUnit()
-
withIntervalInSeconds
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
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
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
Set the trigger to fire on the given days of the month.- Parameters:
onDaysOfMonth- a- Returns:
- the updated DailyTimeIntervalScheduleBuilder
-
onDaysOfTheMonth
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
Set the trigger to begin firing each day at the given time.- Returns:
- the updated DailyTimeIntervalScheduleBuilder
-
endingDailyAt
Set the startTimeOfDay for this trigger to end firing each day at the given time.- Returns:
- the updated DailyTimeIntervalScheduleBuilder
-
endingDailyAfterCount
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
If the Trigger misfires, use theTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICYinstruction.- Returns:
- the updated DailyTimeIntervalScheduleBuilder
- See Also:
-
Trigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY
-
withMisfireHandlingInstructionDoNothing
If the Trigger misfires, use theDailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_DO_NOTHINGinstruction.- Returns:
- the updated DailyTimeIntervalScheduleBuilder
- See Also:
-
DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_DO_NOTHING
-
withMisfireHandlingInstructionFireAndProceed
If the Trigger misfires, use theDailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOWinstruction.- Returns:
- the updated DailyTimeIntervalScheduleBuilder
- See Also:
-
DailyTimeIntervalTrigger.MISFIRE_INSTRUCTION_FIRE_ONCE_NOW
-
withRepeatCount
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)
-