Table of Contents

Interface IJobListener

Namespace
Quartz
Assembly
Quartz.dll

The interface to be implemented by classes that want to be informed when a IJobDetail executes. In general, applications that use a IScheduler will not have use for this mechanism.

public interface IJobListener

Remarks

Every member has a default implementation, so an implementation only has to write the notifications it cares about. Name defaults to the implementing type's name.

Properties

Name

The name this listener is registered and removed under.

string Name { get; }

Property Value

string

Remarks

Defaults to the implementing type's name, which is the right answer whenever a scheduler has at most one listener of a given type. Override it when several instances of one type are registered with the same scheduler, because the later registration would otherwise replace the earlier one.

Methods

JobExecutionVetoed(IJobExecutionContext, CancellationToken)

Called by the IScheduler when a IJobDetail was about to be executed (an associated ITrigger has occurred), but a ITriggerListener vetoed it's execution.

ValueTask JobExecutionVetoed(IJobExecutionContext context, CancellationToken cancellationToken = default)

Parameters

context IJobExecutionContext
cancellationToken CancellationToken

Returns

ValueTask

Remarks

The default implementation does nothing.

See Also

JobToBeExecuted(IJobExecutionContext, CancellationToken)

Called by the IScheduler when a IJobDetail is about to be executed (an associated ITrigger has occurred).

This method will not be invoked if the execution of the Job was vetoed by a ITriggerListener.

ValueTask JobToBeExecuted(IJobExecutionContext context, CancellationToken cancellationToken = default)

Parameters

context IJobExecutionContext
cancellationToken CancellationToken

Returns

ValueTask

Remarks

The default implementation does nothing.

See Also

JobWasExecuted(IJobExecutionContext, JobExecutionException?, CancellationToken)

Called by the IScheduler after a IJobDetail has been executed, and be for the associated IOperableTrigger's Triggered(ICalendar?) method has been called.

ValueTask JobWasExecuted(IJobExecutionContext context, JobExecutionException? jobException, CancellationToken cancellationToken = default)

Parameters

context IJobExecutionContext
jobException JobExecutionException
cancellationToken CancellationToken

Returns

ValueTask

Remarks

The default implementation does nothing.

See Also