This implementation of the Calendar excludes the set of times expressed by a
given CronExpression.
Inheritance Hierarchy
Quartz.Impl.CalendarBaseCalendar
Quartz.Impl.CalendarCronCalendar
Namespace: Quartz.Impl.Calendar
Assembly: Quartz (in Quartz.dll) Version: 3.0.0
Syntax
C#
[SerializableAttribute] public class CronCalendar : BaseCalendar
The CronCalendar type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CronCalendar(String) |
Initializes a new instance of the CronCalendar class.
| |
CronCalendar(SerializationInfo, StreamingContext) |
Serialization constructor.
| |
CronCalendar(ICalendar, String) |
Create a CronCalendar with the given cron expression and
BaseCalendar.
| |
CronCalendar(ICalendar, String, TimeZoneInfo) |
Create a CronCalendar with the given cron expression and
BaseCalendar.
|
Properties
Name | Description | |
---|---|---|
CalendarBase |
Set a new base calendar or remove the existing one
(Inherited from BaseCalendar.) | |
CronExpression |
Returns the object representation of the cron expression that defines the
dates and times this calendar excludes.
| |
Description |
Gets or sets the description given to the ICalendar instance by
its creator (if any).
(Inherited from BaseCalendar.) | |
TimeZone | (Overrides BaseCalendarTimeZone.) |
Methods
Name | Description | |
---|---|---|
Clone |
Creates a new object that is a copy of the current instance.
(Overrides BaseCalendarClone.) | |
CloneFields | (Inherited from BaseCalendar.) | |
Equals(Object) | (Overrides BaseCalendarEquals(Object).) | |
Equals(BaseCalendar) | (Inherited from BaseCalendar.) | |
Equals(CronCalendar) | ||
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 | (Overrides BaseCalendarGetHashCode.) | |
GetNextIncludedTimeUtc |
Determine the next time that is 'included' by the
Calendar after the given time. Return the original value if timeStamp is
included. Return 0 if all days are excluded.
(Overrides BaseCalendarGetNextIncludedTimeUtc(DateTimeOffset).) | |
GetObjectData | (Overrides BaseCalendarGetObjectData(SerializationInfo, StreamingContext).) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsTimeIncluded |
Determine whether the given time is 'included' by the
Calendar.
(Overrides BaseCalendarIsTimeIncluded(DateTimeOffset).) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetCronExpressionString |
Sets the cron expression for the calendar to a new value.
| |
ToString | (Overrides ObjectToString.) |
Remarks
It is important to remember that the cron expression here describes a set of times to be excluded from firing. Whereas the cron expression in CronTrigger describes a set of times that can be included for firing. Thus, if a ICronTrigger has a given cron expression and is associated with a CronCalendar with the same expression, the calendar will exclude all the times the trigger includes, and they will cancel each other out.
See Also