Quartz.Impl.TriggersAbstractTrigger
Quartz.Impl.TriggersCronTriggerImpl
Namespace: Quartz.Impl.Triggers
Assembly: Quartz (in Quartz.dll) Version: 3.0.0
[SerializableAttribute] public class CronTriggerImpl : AbstractTrigger, ICronTrigger, ITrigger, IComparable<ITrigger>
The CronTriggerImpl type exposes the following members.
Name | Description | |
---|---|---|
CronTriggerImpl |
Create a CronTriggerImpl with no settings.
| |
CronTriggerImpl(String) |
Create a CronTriggerImpl with the given name and default group.
| |
CronTriggerImpl(String, String) |
Create a CronTriggerImpl with the given name and group.
| |
CronTriggerImpl(String, String, String) |
Create a CronTriggerImpl with the given name, group and
expression.
| |
CronTriggerImpl(String, String, String, String) |
Create a CronTriggerImpl with the given name and group, and
associated with the identified IJobDetail.
| |
CronTriggerImpl(String, String, String, String, String) |
Create a ICronTrigger with the given name and group,
associated with the identified IJobDetail,
and with the given "cron" expression.
| |
CronTriggerImpl(String, String, String, String, String, TimeZoneInfo) |
Create a ICronTrigger with the given name and group,
associated with the identified IJobDetail,
and with the given "cron" expression resolved with respect to the TimeZone.
| |
CronTriggerImpl(String, String, String, String, DateTimeOffset, NullableDateTimeOffset, String) |
Create a ICronTrigger that will occur at the given time,
until the given end time.
If null, the start-time will also be set to the current time, the time zone will be set to the system's default. | |
CronTriggerImpl(String, String, String, String, DateTimeOffset, NullableDateTimeOffset, String, TimeZoneInfo) |
Create a CronTriggerImpl with fire time dictated by the
cronExpression resolved with respect to the specified
timeZone occurring from the startTimeUtc until
the given endTime.
|
Name | Description | |
---|---|---|
CalendarName |
Get or set the ICalendar with the given name with
this Trigger. Use when setting to dis-associate a Calendar.
(Inherited from AbstractTrigger.) | |
CronExpression |
Set the CronExpression to the given one. The TimeZone on the passed-in
CronExpression over-rides any that was already set on the Trigger.
| |
CronExpressionString |
Gets or sets the cron expression string.
| |
Description |
Get or set the description given to the ITrigger instance by
its creator (if any).
(Inherited from AbstractTrigger.) | |
EndTimeUtc |
Get or sets the time at which the CronTrigger should quit
repeating - even if repeatCount isn't yet satisfied.
(Overrides AbstractTriggerEndTimeUtc.) | |
FinalFireTimeUtc |
Returns the last UTC time at which the ITrigger will fire, if
the Trigger will repeat indefinitely, null will be returned.
(Overrides AbstractTriggerFinalFireTimeUtc.)Note that the return time *may* be in the past. | |
FireInstanceId |
This method should not be used by the Quartz client.
(Inherited from AbstractTrigger.) | |
FullJobName | (Inherited from AbstractTrigger.) | |
FullName |
Returns the 'full name' of the ITrigger in the format
"group.name".
(Inherited from AbstractTrigger.) | |
Group |
Get the group of this ITrigger. If , Scheduler.DefaultGroup will be used.
(Inherited from AbstractTrigger.) | |
HasAdditionalProperties |
Gets a value indicating whether this instance has additional properties
that should be considered when for example saving to database.
(Inherited from AbstractTrigger.) | |
HasMillisecondPrecision |
Tells whether this Trigger instance can handle events
in millisecond precision.
(Overrides AbstractTriggerHasMillisecondPrecision.) | |
JobDataMap |
Get or set the JobDataMap that is associated with the
ITrigger.
(Inherited from AbstractTrigger.)Changes made to this map during job execution are not re-persisted, and in fact typically result in an illegal state. | |
JobGroup |
Gets or sets the name of the associated IJobDetail's
group. If set with , Scheduler.DefaultGroup will be used.
(Inherited from AbstractTrigger.) | |
JobKey | (Inherited from AbstractTrigger.) | |
JobName |
Get or set the name of the associated IJobDetail.
(Inherited from AbstractTrigger.) | |
Key |
Gets the key.
(Inherited from AbstractTrigger.) | |
MisfireInstruction |
Get or set the instruction the IScheduler should be given for
handling misfire situations for this ITrigger- the
concrete ITrigger type that you are using will have
defined a set of additional MISFIRE_INSTRUCTION_XXX
constants that may be passed to this method.
(Inherited from AbstractTrigger.)If not explicitly set, the default value is InstructionNotSet. | |
Name |
Get or sets the name of this ITrigger.
(Inherited from AbstractTrigger.) | |
Priority |
The priority of a ITrigger acts as a tie breaker such that if
two ITriggers have the same scheduled fire time, then Quartz
will do its best to give the one with the higher priority first access
to a worker thread.
(Inherited from AbstractTrigger.) | |
StartTimeUtc |
Returns the date/time on which the trigger may begin firing. This
defines the initial boundary for trigger firings the trigger
will not fire prior to this date and time.
(Overrides AbstractTriggerStartTimeUtc.) | |
TimeZone |
Sets the time zone for which the CronExpressionString of this
ICronTrigger will be resolved.
|
Name | Description | |
---|---|---|
Clone |
Clones this instance.
(Overrides AbstractTriggerClone.) | |
CompareTo |
Compare the next fire time of this ITrigger to that of
another by comparing their keys, or in other words, sorts them
according to the natural (i.e. alphabetical) order of their keys.
(Inherited from AbstractTrigger.) | |
ComputeFirstFireTimeUtc |
Called by the scheduler at the time a ITrigger is first
added to the scheduler, in order to have the ITrigger
compute its first fire time, based on any associated calendar.
(Overrides AbstractTriggerComputeFirstFireTimeUtc(ICalendar).)After this method has been called, GetNextFireTimeUtc should return a valid answer. | |
Equals(Object) | (Inherited from AbstractTrigger.) | |
Equals(AbstractTrigger) |
Trigger equality is based upon the equality of the TriggerKey.
(Inherited from AbstractTrigger.) | |
ExecutionComplete |
This method should not be used by the Quartz client.
(Inherited from AbstractTrigger.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetExpressionSummary |
Gets the expression summary.
| |
GetFireTimeAfter |
Returns the next time at which the ITrigger will fire,
after the given time. If the trigger will not fire after the given time,
will be returned.
(Overrides AbstractTriggerGetFireTimeAfter(NullableDateTimeOffset).) | |
GetHashCode |
Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from AbstractTrigger.) | |
GetMayFireAgain |
Used by the IScheduler to determine whether or not
it is possible for this ITrigger to fire again.
(Overrides AbstractTriggerGetMayFireAgain.)If the returned value is then the IScheduler may remove the ITrigger from the IJobStore. | |
GetNextFireTimeUtc |
Returns the next time at which the ITrigger is scheduled to fire. If
the trigger will not fire again, will be returned. Note that
the time returned can possibly be in the past, if the time that was computed
for the trigger to next fire has already arrived, but the scheduler has not yet
been able to fire the trigger (which would likely be due to lack of resources
e.g. threads).
(Overrides AbstractTriggerGetNextFireTimeUtc.) | |
GetPreviousFireTimeUtc |
Returns the previous time at which the ITrigger fired.
If the trigger has not yet fired, will be returned.
(Overrides AbstractTriggerGetPreviousFireTimeUtc.) | |
GetScheduleBuilder | (Overrides AbstractTriggerGetScheduleBuilder.) | |
GetTimeAfter |
Gets the next time to fire after the given time.
| |
GetTimeBefore |
NOT YET IMPLEMENTED: Returns the time before the given time
that this ICronTrigger will fire.
| |
GetTriggerBuilder | (Inherited from AbstractTrigger.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetNextFireTimeUtc |
Sets the next fire time.
(Overrides AbstractTriggerSetNextFireTimeUtc(NullableDateTimeOffset).)This method should not be invoked by client code. | |
SetPreviousFireTimeUtc |
Sets the previous fire time.
(Overrides AbstractTriggerSetPreviousFireTimeUtc(NullableDateTimeOffset).)This method should not be invoked by client code. | |
ToString |
Return a simple string representation of this object.
(Inherited from AbstractTrigger.) | |
Triggered |
Called when the IScheduler has decided to 'fire'
the trigger (Execute the associated IJob), in order to
give the ITrigger a chance to update itself for its next
triggering (if any).
(Overrides AbstractTriggerTriggered(ICalendar).) | |
UpdateAfterMisfire |
This method should not be used by the Quartz client.
(Overrides AbstractTriggerUpdateAfterMisfire(ICalendar).)To be implemented by the concrete classes that extend this class. The implementation should update the ITrigger's state based on the MISFIRE_INSTRUCTION_XXX that was selected when the ITrigger was created. | |
UpdateWithNewCalendar |
Updates the trigger with new calendar.
(Overrides AbstractTriggerUpdateWithNewCalendar(ICalendar, TimeSpan).) | |
Validate |
Validates whether the properties of the IJobDetail are
valid for submission into a IScheduler.
(Inherited from AbstractTrigger.) | |
ValidateMisfireInstruction |
Validates the misfire instruction.
(Overrides AbstractTriggerValidateMisfireInstruction(Int32).) | |
WillFireOn(DateTimeOffset) | Determines whether the date and (optionally) time of the given Calendar instance falls on a scheduled fire-time of this trigger. Equivalent to calling WillFireOn(DateTimeOffset, Boolean). | |
WillFireOn(DateTimeOffset, Boolean) |
Determines whether the date and (optionally) time of the given Calendar
instance falls on a scheduled fire-time of this trigger.
Note that the value returned is NOT validated against the related ICalendar (if any). |
Name | Description | |
---|---|---|
YearToGiveupSchedulingAt |
For those unfamiliar with "cron", this means being able to create a firing schedule such as: "At 8:00am every Monday through Friday" or "At 1:30am every last Friday of the month".
The format of a "Cron-Expression" string is documented on the CronExpression class.
Here are some full examples:
Expression | Meaning | |
---|---|---|
"0 0 12 * * ?"" /> | Fire at 12pm (noon) every day" /> | |
"0 15 10 ? * *"" /> | Fire at 10:15am every day" /> | |
"0 15 10 * * ?"" /> | Fire at 10:15am every day" /> | |
"0 15 10 * * ? *"" /> | Fire at 10:15am every day" /> | |
"0 15 10 * * ? 2005"" /> | Fire at 10:15am every day during the year 2005" /> | |
"0 * 14 * * ?"" /> | Fire every minute starting at 2pm and ending at 2:59pm, every day" /> | |
"0 0/5 14 * * ?"" /> | Fire every 5 minutes starting at 2pm and ending at 2:55pm, every day" /> | |
"0 0/5 14,18 * * ?"" /> | Fire every 5 minutes starting at 2pm and ending at 2:55pm, AND fire every 5 minutes starting at 6pm and ending at 6:55pm, every day" /> | |
"0 0-5 14 * * ?"" /> | Fire every minute starting at 2pm and ending at 2:05pm, every day" /> | |
"0 10,44 14 ? 3 WED"" /> | Fire at 2:10pm and at 2:44pm every Wednesday in the month of March." /> | |
"0 15 10 ? * MON-FRI"" /> | Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday" /> | |
"0 15 10 15 * ?"" /> | Fire at 10:15am on the 15th day of every month" /> | |
"0 15 10 L * ?"" /> | Fire at 10:15am on the last day of every month" /> | |
"0 15 10 ? * 6L"" /> | Fire at 10:15am on the last Friday of every month" /> | |
"0 15 10 ? * 6L"" /> | Fire at 10:15am on the last Friday of every month" /> | |
"0 15 10 ? * 6L 2002-2005"" /> | Fire at 10:15am on every last Friday of every month during the years 2002, 2003, 2004 and 2005" /> | |
"0 15 10 ? * 6#3"" /> | Fire at 10:15am on the third Friday of every month" /> |
Pay attention to the effects of '?' and '*' in the day-of-week and day-of-month fields!
NOTES:
- Support for specifying both a day-of-week and a day-of-month value is not complete (you'll need to use the '?' character in on of these fields).
- Be careful when setting fire times between mid-night and 1:00 AM - "daylight savings" can cause a skip or a repeat depending on whether the time moves back or jumps forward.