Class RecurrenceScheduleBuilder
- Namespace
- Quartz
- Assembly
- Quartz.dll
RecurrenceScheduleBuilder is a IScheduleBuilder that defines RFC 5545 RRULE-based schedules for triggers.
public sealed class RecurrenceScheduleBuilder : IScheduleBuilder
- Inheritance
-
RecurrenceScheduleBuilder
- Implements
- Inherited Members
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.
ITrigger trigger = TriggerBuilder.Create()
.WithIdentity("myTrigger", "myGroup")
.WithRecurrenceSchedule("FREQ=MONTHLY;BYDAY=2MO")
.StartNow()
.Build();
Methods
Build()
Build the actual trigger -- NOT intended to be invoked by end users, but will rather be invoked by a TriggerBuilder which this IScheduleBuilder is given to.
public IMutableTrigger Build()
Returns
Create(string)
Create a RecurrenceScheduleBuilder with the given RRULE string.
public static RecurrenceScheduleBuilder Create(string recurrenceRule)
Parameters
recurrenceRulestringAn RFC 5545 RRULE string, e.g. "FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,WE,FR".
Returns
InTimeZone(TimeZoneInfo?)
Set the time zone for recurrence calculations.
public RecurrenceScheduleBuilder InTimeZone(TimeZoneInfo? timeZone)
Parameters
timeZoneTimeZoneInfothe time-zone for the schedule. null, like never calling this, names none: the scheduler's DefaultTimeZone applies when the trigger is stored, and the system's local time zone when that is not set.
Returns
WithMisfireInstruction(RecurrenceTriggerMisfireInstruction)
Say what the trigger should do when it misses a firing.
public RecurrenceScheduleBuilder WithMisfireInstruction(RecurrenceTriggerMisfireInstruction instruction)
Parameters
instructionRecurrenceTriggerMisfireInstructionthe policy to apply. A builder never given one leaves the instruction unstated, and the scheduler's DefaultMisfireHandling decides it when the trigger is scheduled: SmartPolicy unless configured otherwise. Passing SmartPolicy states it, and the default then leaves it alone.
Returns
- RecurrenceScheduleBuilder
the updated RecurrenceScheduleBuilder
- See Also