CalendarIntervalScheduleBuilder is a IScheduleBuilder
that defines calendar time (day, week, month, year) interval-based
schedules for Triggers.
Inheritance Hierarchy
QuartzScheduleBuilderICalendarIntervalTrigger
QuartzCalendarIntervalScheduleBuilder
Namespace: Quartz
Assembly: Quartz (in Quartz.dll) Version: 3.0.0
Syntax
C#
public class CalendarIntervalScheduleBuilder : ScheduleBuilder<ICalendarIntervalTrigger>
The CalendarIntervalScheduleBuilder type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CalendarIntervalScheduleBuilder | Initializes a new instance of the CalendarIntervalScheduleBuilder class |
Methods
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 CalendarIntervalScheduleBuilder.
| |
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.) | |
PreserveHourOfDayAcrossDaylightSavings |
If intervals are a day or greater, this property (set to true) will
cause the firing of the trigger to always occur at the same time of day,
(the time of day of the startTime) regardless of daylight saving time
transitions. Default value is false.
| |
SkipDayIfHourDoesNotExist |
If intervals are a day or greater, and
preserveHourOfDayAcrossDaylightSavings property is set to true, and the
hour of the day does not exist on a given day for which the trigger
would fire, the day will be skipped and the trigger advanced a second
interval if this property is set to true. Defaults to false.
| |
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.
| |
WithIntervalInDays |
Specify an interval in the IntervalUnit.DAY that the produced
Trigger will repeat at.
| |
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.
| |
WithIntervalInMonths |
Specify an interval in the IntervalUnit.MONTH that the produced
Trigger will repeat at.
| |
WithIntervalInSeconds |
Specify an interval in the IntervalUnit.SECOND that the produced
Trigger will repeat at.
| |
WithIntervalInWeeks |
Specify an interval in the IntervalUnit.WEEK that the produced
Trigger will repeat at.
| |
WithIntervalInYears |
Specify an interval in the IntervalUnit.YEAR 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.
|
Remarks
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:
JobDetail job = JobBuilder.Create<MyJob>() .WithIdentity("myJob") .Build(); Trigger trigger = TriggerBuilder.Create() .WithIdentity("myTrigger", "myTriggerGroup") .WithSimpleSchedule(x => x .WithIntervalInHours(1) .RepeatForever()) .StartAt(DateBuilder.FutureDate(10, IntervalUnit.Minute)) .Build(); scheduler.scheduleJob(job, trigger);
See Also