CronScheduleBuilder Class

Quartz.NET 3.0 API Documentation
CronScheduleBuilder is a IScheduleBuilder that defines CronExpression-based schedules for ITriggers.
Inheritance Hierarchy

SystemObject
  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

  NameDescription
Protected methodCronScheduleBuilder
Initializes a new instance of the CronScheduleBuilder class
Top
Methods

  NameDescription
Public methodStatic memberAtHourAndMinuteOnGivenDaysOfWeek
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.
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 memberCronSchedule(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).
Public methodStatic memberCronSchedule(CronExpression)
Create a CronScheduleBuilder with the given cron-expression.
Public methodStatic memberDailyAtHourAndMinute
Create a CronScheduleBuilder with a cron-expression that sets the schedule to fire every day at the given time (hour and minute).
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
The TimeZoneInfo in which to base the schedule.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberMonthlyOnDayAndHourAndMinute
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).
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberWeeklyOnDayAndHourAndMinute
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).
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.
Top
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

Reference