DailyTimeIntervalScheduleBuilder Class

Quartz.NET 3.0 API Documentation
A IScheduleBuilder implementation that build schedule for DailyTimeIntervalTrigger.
Inheritance Hierarchy

SystemObject
  QuartzScheduleBuilderIDailyTimeIntervalTrigger
    QuartzDailyTimeIntervalScheduleBuilder

Namespace:  Quartz
Assembly:  Quartz (in Quartz.dll) Version: 3.0.0
Syntax

C#
public class DailyTimeIntervalScheduleBuilder : ScheduleBuilder<IDailyTimeIntervalTrigger>

The DailyTimeIntervalScheduleBuilder type exposes the following members.

Constructors

  NameDescription
Protected methodDailyTimeIntervalScheduleBuilder
Initializes a new instance of the DailyTimeIntervalScheduleBuilder class
Top
Methods

  NameDescription
Public methodBuild
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.)
Public methodStatic memberCreate
Create a DailyTimeIntervalScheduleBuilder
Public methodEndingDailyAfterCount
Calculate and set the EndTimeOfDay using count, interval and StarTimeOfDay. This means that these must be set before this method is call.
Public methodEndingDailyAt
Set the startTimeOfDay for this trigger to end firing each day at the given time.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInTimeZone
TimeZone in which to base the schedule.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOnDaysOfTheWeek(IReadOnlyCollectionDayOfWeek)
Set the trigger to fire on the given days of the week.
Public methodOnDaysOfTheWeek(DayOfWeek)
Set the trigger to fire on the given days of the week.
Public methodOnEveryDay
Set the trigger to fire on all days of the week.
Public methodOnMondayThroughFriday
Set the trigger to fire on the days from Monday through Friday.
Public methodOnSaturdayAndSunday
Set the trigger to fire on the days Saturday and Sunday.
Public methodStartingDailyAt
Set the trigger to begin firing each day at the given time.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWithInterval
Specify the time unit and interval for the Trigger to be produced.
Public methodWithIntervalInHours
Specify an interval in the IntervalUnit.Hour that the produced Trigger will repeat at.
Public methodWithIntervalInMinutes
Specify an interval in the IntervalUnit.Minute that the produced Trigger will repeat at.
Public methodWithIntervalInSeconds
Specify an interval in the IntervalUnit.Second that the produced Trigger will repeat at.
Public methodWithMisfireHandlingInstructionDoNothing
If the Trigger misfires, use the DoNothing instruction.
Public methodWithMisfireHandlingInstructionFireAndProceed
If the Trigger misfires, use the FireOnceNow instruction.
Public methodWithMisfireHandlingInstructionIgnoreMisfires
If the Trigger misfires, use the IgnoreMisfirePolicy instruction.
Public methodWithRepeatCount
Set number of times for interval to repeat.
Top
Fields

  NameDescription
Public fieldStatic memberAllDaysOfTheWeek
A set of all days of the week.
Public fieldStatic memberMondayThroughFriday
A set of the business days of the week (for locales similar to the USA).
Public fieldStatic memberSaturdayAndSunday
A set of the weekend days of the week (for locales similar to the USA).
Top
Remarks

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);
See Also

Reference