DateBuilder Class

Quartz.NET 3.0 API Documentation
DateBuilder is used to conveniently create DateTimeOffset instances that meet particular criteria.
Inheritance Hierarchy

SystemObject
  QuartzDateBuilder

Namespace:  Quartz
Assembly:  Quartz (in Quartz.dll) Version: 3.0.0
Syntax

C#
public class DateBuilder

The DateBuilder type exposes the following members.

Methods

  NameDescription
Public methodAtHourMinuteAndSecond
Public methodAtHourOfDay
Set the hour (0-23) for the Date that will be built by this builder.
Public methodAtMinute
Set the minute (0-59) for the Date that will be built by this builder.
Public methodAtSecond
Set the second (0-59) for the Date that will be built by this builder, and truncate the milliseconds to 000.
Public methodBuild
Build the DateTimeOffset defined by this builder instance.
Public methodStatic memberDateOf(Int32, Int32, Int32)
Get a DateTimeOffset object that represents the given time, on today's date.
Public methodStatic memberDateOf(Int32, Int32, Int32, Int32, Int32)
Get a DateTimeOffset object that represents the given time, on the given date.
Public methodStatic memberDateOf(Int32, Int32, Int32, Int32, Int32, Int32)
Get a DateTimeOffset object that represents the given time, on the given date.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodStatic memberEvenHourDate
Returns a date that is rounded to the next even hour above the given date.
Public methodStatic memberEvenHourDateAfterNow
Returns a date that is rounded to the next even hour after the current time.
Public methodStatic memberEvenHourDateBefore
Returns a date that is rounded to the previous even hour below the given date.
Public methodStatic memberEvenMinuteDate
Returns a date that is rounded to the next even minute above the given date.
Public methodStatic memberEvenMinuteDateAfterNow

Returns a date that is rounded to the next even minute after the current time.

Public methodStatic memberEvenMinuteDateBefore
Returns a date that is rounded to the previous even minute below the given date.
Public methodStatic memberEvenSecondDate
Returns a date that is rounded to the next even second above the given date.
Public methodStatic memberEvenSecondDateAfterNow
Returns a date that is rounded to the next even second after the current time.
Public methodStatic memberEvenSecondDateBefore
Returns a date that is rounded to the previous even second below the given date.
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 methodStatic memberFutureDate
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInMonth
Set the month (1-12) for the Date that will be built by this builder.
Public methodInMonthOnDay
Public methodInTimeZone
Set the TimeZoneInfo for the Date that will be built by this builder (if "null", system default will be used)
Public methodInYear
Set the year for the Date that will be built by this builder.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberNewDate
Create a DateBuilder, with initial settings for the current date and time in the system default timezone.
Public methodStatic memberNewDateInTimeZone
Create a DateBuilder, with initial settings for the current date and time in the given timezone.
Public methodStatic memberNextGivenMinuteDate
Returns a date that is rounded to the next even multiple of the given minute.
Public methodStatic memberNextGivenSecondDate
Returns a date that is rounded to the next even multiple of the given minute.
Public methodOnDay
Set the day of month (1-31) for the Date that will be built by this builder.
Public methodStatic memberTodayAt
Get a DateTimeOffset object that represents the given time, on today's date (equivalent to DateOf(Int32, Int32, Int32)).
Public methodStatic memberTomorrowAt
Get a DateTimeOffset object that represents the given time, on tomorrow's date.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberValidateDayOfMonth
Public methodStatic memberValidateHour
Public methodStatic memberValidateMinute
Public methodStatic memberValidateMonth
Public methodStatic memberValidateSecond
Public methodStatic memberValidateYear
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.Minutes))
    .Build();
scheduler.scheduleJob(job, trigger);
See Also

Reference