CronScheduleBuilder is a IScheduleBuilder that defines
CronExpression-based schedules for ITriggers.
Inheritance Hierarchy
QuartzScheduleBuilderICronTrigger
QuartzCronScheduleBuilder
Namespace: Quartz
Assembly: Quartz (in Quartz.dll) Version: 3.0.0
Syntax
C#
public class CronScheduleBuilder : ScheduleBuilder<ICronTrigger>
The CronScheduleBuilder type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CronScheduleBuilder | Initializes a new instance of the CronScheduleBuilder class |
Methods
Name | Description | |
---|---|---|
AtHourAndMinuteOnGivenDaysOfWeek |
Create a CronScheduleBuilder with a cron-expression that sets the
schedule to fire at the given day at the given time (hour and minute) on the given days of the week.
| |
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.) | |
CronSchedule(String) |
Create a CronScheduleBuilder with the given cron-expression - which
is presumed to b e valid cron expression (and hence only a RuntimeException
will be thrown if it is not).
| |
CronSchedule(CronExpression) |
Create a CronScheduleBuilder with the given cron-expression.
| |
DailyAtHourAndMinute |
Create a CronScheduleBuilder with a cron-expression that sets the
schedule to fire every day at the given time (hour and minute).
| |
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 |
The TimeZoneInfo in which to base the schedule.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MonthlyOnDayAndHourAndMinute |
Create a CronScheduleBuilder with a cron-expression that sets the
schedule to fire one per month on the given day of month at the given
time (hour and minute).
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
WeeklyOnDayAndHourAndMinute |
Create a CronScheduleBuilder with a cron-expression that sets the
schedule to fire one per week on the given day at the given time
(hour and minute).
| |
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:
IJobDetail job = JobBuilder.Create<MyJob>() .WithIdentity("myJob") .Build(); ITrigger trigger = newTrigger() .WithIdentity(triggerKey("myTrigger", "myTriggerGroup")) .WithSimpleSchedule(x => x.WithIntervalInHours(1).RepeatForever()) .StartAt(DateBuilder.FutureDate(10, IntervalUnit.Minute)) .Build(); scheduler.scheduleJob(job, trigger);
See Also