SimpleScheduleBuilder is a IScheduleBuilder
that defines strict/literal interval-based schedules for
ITriggers.
Inheritance Hierarchy
QuartzScheduleBuilderISimpleTrigger
QuartzSimpleScheduleBuilder
Namespace: Quartz
Assembly: Quartz (in Quartz.dll) Version: 3.0.0
Syntax
C#
public class SimpleScheduleBuilder : ScheduleBuilder<ISimpleTrigger>
The SimpleScheduleBuilder type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SimpleScheduleBuilder | Initializes a new instance of the SimpleScheduleBuilder 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 SimpleScheduleBuilder.
| |
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.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
RepeatForever |
Specify that the trigger will repeat indefinitely.
| |
RepeatHourlyForever |
Create a SimpleScheduleBuilder set to repeat forever with a 1 hour interval.
| |
RepeatHourlyForever(Int32) |
Create a SimpleScheduleBuilder set to repeat forever with an interval
of the given number of hours.
| |
RepeatHourlyForTotalCount(Int32) |
Create a SimpleScheduleBuilder set to repeat the given number
of times - 1 with a 1 hour interval.
| |
RepeatHourlyForTotalCount(Int32, Int32) |
Create a SimpleScheduleBuilder set to repeat the given number
of times - 1 with an interval of the given number of hours.
| |
RepeatMinutelyForever |
Create a SimpleScheduleBuilder set to repeat forever with a 1 minute interval.
| |
RepeatMinutelyForever(Int32) |
Create a SimpleScheduleBuilder set to repeat forever with an interval
of the given number of minutes.
| |
RepeatMinutelyForTotalCount(Int32) |
Create a SimpleScheduleBuilder set to repeat the given number
of times - 1 with a 1 minute interval.
| |
RepeatMinutelyForTotalCount(Int32, Int32) |
Create a SimpleScheduleBuilder set to repeat the given number
of times - 1 with an interval of the given number of minutes.
| |
RepeatSecondlyForever |
Create a SimpleScheduleBuilder set to repeat forever with a 1 second interval.
| |
RepeatSecondlyForever(Int32) |
Create a SimpleScheduleBuilder set to repeat forever with an interval
of the given number of seconds.
| |
RepeatSecondlyForTotalCount(Int32) |
Create a SimpleScheduleBuilder set to repeat the given number
of times - 1 with a 1 second interval.
| |
RepeatSecondlyForTotalCount(Int32, Int32) |
Create a SimpleScheduleBuilder set to repeat the given number
of times - 1 with an interval of the given number of seconds.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
WithInterval |
Specify a repeat interval in milliseconds.
| |
WithIntervalInHours | ||
WithIntervalInMinutes | ||
WithIntervalInSeconds |
Specify a repeat interval in seconds.
| |
WithMisfireHandlingInstructionFireNow |
If the Trigger misfires, use the
FireNow instruction.
| |
WithMisfireHandlingInstructionIgnoreMisfires |
If the Trigger misfires, use the
IgnoreMisfirePolicy instruction.
| |
WithMisfireHandlingInstructionNextWithExistingCount |
If the Trigger misfires, use the
RescheduleNextWithExistingCount instruction.
| |
WithMisfireHandlingInstructionNextWithRemainingCount |
If the Trigger misfires, use the
RescheduleNextWithRemainingCount instruction.
| |
WithMisfireHandlingInstructionNowWithExistingCount |
If the Trigger misfires, use the
RescheduleNowWithExistingRepeatCount instruction.
| |
WithMisfireHandlingInstructionNowWithRemainingCount |
If the Trigger misfires, use the
RescheduleNowWithRemainingRepeatCount instruction.
| |
WithRepeatCount |
Specify a the number of time the trigger will repeat - total number of
firings will be this number + 1.
|
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(triggerKey("myTrigger", "myTriggerGroup")) .WithSimpleSchedule(x => x .WithIntervalInHours(1) .RepeatForever()) .StartAt(DateBuilder.FutureDate(10, IntervalUnit.Minute)) .Build(); scheduler.scheduleJob(job, trigger);
See Also