QuartzScheduleBuilderIDailyTimeIntervalTrigger
QuartzDailyTimeIntervalScheduleBuilder
Namespace: Quartz
Assembly: Quartz (in Quartz.dll) Version: 3.0.0
public class DailyTimeIntervalScheduleBuilder : ScheduleBuilder<IDailyTimeIntervalTrigger>
The DailyTimeIntervalScheduleBuilder type exposes the following members.
Name | Description | |
---|---|---|
DailyTimeIntervalScheduleBuilder | Initializes a new instance of the DailyTimeIntervalScheduleBuilder class |
Name | Description | |
---|---|---|
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.
(Overrides ScheduleBuilderTBuild.) | |
Create |
Create a DailyTimeIntervalScheduleBuilder
| |
EndingDailyAfterCount |
Calculate and set the EndTimeOfDay using count, interval and StarTimeOfDay. This means
that these must be set before this method is call.
| |
EndingDailyAt |
Set the startTimeOfDay for this trigger to end firing each day at the given time.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
InTimeZone |
TimeZone in which to base the schedule.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnDaysOfTheWeek(IReadOnlyCollectionDayOfWeek) |
Set the trigger to fire on the given days of the week.
| |
OnDaysOfTheWeek(DayOfWeek) |
Set the trigger to fire on the given days of the week.
| |
OnEveryDay |
Set the trigger to fire on all days of the week.
| |
OnMondayThroughFriday |
Set the trigger to fire on the days from Monday through Friday.
| |
OnSaturdayAndSunday |
Set the trigger to fire on the days Saturday and Sunday.
| |
StartingDailyAt |
Set the trigger to begin firing each day at the given time.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
WithInterval |
Specify the time unit and interval for the Trigger to be produced.
| |
WithIntervalInHours |
Specify an interval in the IntervalUnit.Hour that the produced
Trigger will repeat at.
| |
WithIntervalInMinutes |
Specify an interval in the IntervalUnit.Minute that the produced
Trigger will repeat at.
| |
WithIntervalInSeconds |
Specify an interval in the IntervalUnit.Second that the produced
Trigger will repeat at.
| |
WithMisfireHandlingInstructionDoNothing |
If the Trigger misfires, use the
DoNothing instruction.
| |
WithMisfireHandlingInstructionFireAndProceed |
If the Trigger misfires, use the
FireOnceNow instruction.
| |
WithMisfireHandlingInstructionIgnoreMisfires |
If the Trigger misfires, use the
IgnoreMisfirePolicy instruction.
| |
WithRepeatCount |
Set number of times for interval to repeat.
|
Name | Description | |
---|---|---|
AllDaysOfTheWeek |
A set of all days of the week.
| |
MondayThroughFriday |
A set of the business days of the week (for locales similar to the USA).
| |
SaturdayAndSunday |
A set of the weekend days of the week (for locales similar to the USA).
|
This builder provide an extra convenient method for you to set the trigger's EndTimeOfDay. You may use either endingDailyAt() or EndingDailyAfterCount() to set the value. The later will auto calculate your EndTimeOfDay by using the interval, IntervalUnit and StartTimeOfDay to perform the calculation.
When using EndingDailyAfterCount(), you should note that it is used to calculating EndTimeOfDay. So if your startTime on the first day is already pass by a time that would not add up to the count you expected, until the next day comes. Remember that DailyTimeIntervalTrigger will use StartTimeOfDay and endTimeOfDay as fresh per each day!
Quartz provides a builder-style API for constructing scheduling-related entities via a Domain-Specific Language (DSL). The DSL can best be utilized through the usage of static imports of the methods on the classes TriggerBuilder, JobBuilder, DateBuilder, JobKey, TriggerKey and the various IScheduleBuilder implementations.
Client code can then use the DSL to write code such as this:
IJobDetail job = JobBuilder.Create<MyJob>() .WithIdentity("myJob") .Build(); ITrigger trigger = TriggerBuilder.Create() .WithIdentity(triggerKey("myTrigger", "myTriggerGroup")) .WithDailyTimeIntervalSchedule(x => x.WithIntervalInMinutes(15) .StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(8, 0))) .Build(); scheduler.scheduleJob(job, trigger);