A context bundle containing handles to various environment information, that
is given to a JobDetail instance as it is
executed, and to a ITrigger instance after the
execution completes.
Namespace: Quartz
Assembly: Quartz (in Quartz.dll) Version: 3.0.0
Syntax
C#
public interface IJobExecutionContext
The IJobExecutionContext type exposes the following members.
Properties
Name | Description | |
---|---|---|
Calendar | ||
CancellationToken |
Returns the cancellation token which will be cancelled when the job cancellation has been requested via
Interrupt(JobKey, CancellationToken)
or Interrupt(String, CancellationToken).
| |
FireInstanceId |
Get the unique Id that identifies this particular firing instance of the
trigger that triggered this job execution. It is unique to this
JobExecutionContext instance as well.
| |
FireTimeUtc |
The actual time the trigger fired. For instance the scheduled time may
have been 10:00:00 but the actual fire time may have been 10:00:03 if
the scheduler was too busy.
| |
JobDetail | ||
JobInstance |
Get the instance of the IJob that was created for this
execution.
Note: The Job instance is not available through remote scheduler interfaces. | |
JobRunTime |
The amount of time the job ran for. The returned
value will be MinValue until the job has actually completed (or thrown an
exception), and is therefore generally only useful to
IJobListeners and ITriggerListeners.
| |
MergedJobDataMap |
Get the convenience JobDataMap of this execution context.
| |
NextFireTimeUtc |
Gets the next fire time.
| |
PreviousFireTimeUtc |
Gets the previous fire time.
| |
Recovering |
If the IJob is being re-executed because of a 'recovery'
situation, this method will return .
| |
RecoveringTriggerKey |
Returns the TriggerKey of the originally scheduled and now recovering job.
| |
RefireCount |
Gets the refire count.
| |
Result |
Returns the result (if any) that the IJob set before its
execution completed (the type of object set as the result is entirely up
to the particular job).
| |
ScheduledFireTimeUtc |
The scheduled time the trigger fired for. For instance the scheduled
time may have been 10:00:00 but the actual fire time may have been
10:00:03 if the scheduler was too busy.
| |
Scheduler |
Get a handle to the IScheduler instance that fired the
IJob.
| |
Trigger |
Methods
Name | Description | |
---|---|---|
Get |
Get the value with the given key from the context's data map.
| |
Put |
Put the specified value into the context's data map with the given key.
Possibly useful for sharing data between listeners and jobs.
NOTE: this data is volatile - it is lost after the job execution completes, and all TriggerListeners and JobListeners have been notified. |
See Also