Table of Contents

Interface ISchedulerSignaler

Namespace
Quartz.Extensibility
Assembly
Quartz.dll

An interface to be used by IJobStore instances in order to communicate signals back to the scheduler that owns them.

public interface ISchedulerSignaler

Remarks

Every member here runs scheduler and listener code on the calling thread, and a listener is entitled to do what any other caller does: pause a trigger, reschedule one, ask the store a question. That call comes straight back into the store that signalled. A store whose lock is not re-entrant therefore has to release it first, or the listener deadlocks against the caller it is running on: RAMJobStore collects what it owes while it holds its semaphore and raises it once the lock is gone, in the order it recorded it. A store holding a database lock is re-entrant for its own connection by construction, but what it announces from inside a transaction may still roll back, so it too prefers to notify after the commit.

Methods

NotifySchedulerListenersError(SchedulerErrorContext, CancellationToken)

Informs scheduler listeners about an exception that has occurred.

ValueTask NotifySchedulerListenersError(SchedulerErrorContext errorContext, CancellationToken cancellationToken = default)

Parameters

errorContext SchedulerErrorContext

What went wrong, and what it went wrong for.

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask

Remarks

The context is how a job store reports which trigger, job or firing the failure was for; a store that knows none of them fills in Message and Exception alone.

NotifySchedulerListenersFinalized(ITrigger, CancellationToken)

Notifies the scheduler about finalized trigger.

ValueTask NotifySchedulerListenersFinalized(ITrigger trigger, CancellationToken cancellationToken = default)

Parameters

trigger ITrigger

The trigger that has finalized.

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask

NotifySchedulerListenersJobDeleted(JobKey, CancellationToken)

Notifies the scheduler that a job has been deleted, so that its listeners are told.

ValueTask NotifySchedulerListenersJobDeleted(JobKey jobKey, CancellationToken cancellationToken = default)

Parameters

jobKey JobKey

The job that was deleted.

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask

NotifySchedulerListenersTriggerInError(TriggerKey, CancellationToken)

Notifies the scheduler that a trigger has been parked in the Error state and will not fire again until it is reset.

ValueTask NotifySchedulerListenersTriggerInError(TriggerKey triggerKey, CancellationToken cancellationToken = default)

Parameters

triggerKey TriggerKey
cancellationToken CancellationToken

Returns

ValueTask

Remarks

Default-implemented as a no-op so that an existing signaler keeps compiling; a job store that calls it against one gets today's behaviour, which is no notification at all.

NotifySchedulerListenersTriggersInError(JobKey, CancellationToken)

Notifies the scheduler that every trigger of a job has been parked in the Error state.

ValueTask NotifySchedulerListenersTriggersInError(JobKey jobKey, CancellationToken cancellationToken = default)

Parameters

jobKey JobKey
cancellationToken CancellationToken

Returns

ValueTask

Remarks

Default-implemented as a no-op, for the same reason as NotifySchedulerListenersTriggerInError(TriggerKey, CancellationToken).

NotifyTriggerListenersMisfired(ITrigger, CancellationToken)

Notifies the scheduler about misfired trigger.

ValueTask NotifyTriggerListenersMisfired(ITrigger trigger, CancellationToken cancellationToken = default)

Parameters

trigger ITrigger

The trigger that misfired.

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask

SignalSchedulingChange(DateTimeOffset?, CancellationToken)

Signals the scheduling change.

ValueTask SignalSchedulingChange(DateTimeOffset? candidateNewNextFireTimeUtc, CancellationToken cancellationToken = default)

Parameters

candidateNewNextFireTimeUtc DateTimeOffset?
cancellationToken CancellationToken

Returns

ValueTask