Table of Contents

Class ScheduleBox

Namespace
H.Controls.ScheduleBox
Assembly
H.Controls.ScheduleBox.dll
public class ScheduleBox : ItemsControl, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IContainItemStorage, IAddChild, IJobListener, ITriggerListener, ISchedulerListener
Inheritance
ScheduleBox
Implements
IJobListener
ITriggerListener
ISchedulerListener
Inherited Members
Extension Methods

Constructors

ScheduleBox()

public ScheduleBox()

Fields

MessagesProperty

public static readonly DependencyProperty MessagesProperty

Field Value

DependencyProperty

SchedulerMetaDataProperty

public static readonly DependencyProperty SchedulerMetaDataProperty

Field Value

DependencyProperty

Properties

JobsSource

public ObservableCollection<IScheduleJob> JobsSource { get; }

Property Value

ObservableCollection<IScheduleJob>

Messages

public ObservableCollection<string> Messages { get; set; }

Property Value

ObservableCollection<string>

SchedulerMetaData

public SchedulerMetaData SchedulerMetaData { get; set; }

Property Value

SchedulerMetaData

Methods

AddMessage(string, string)

public void AddMessage(string message, string methodName = null)

Parameters

message string
methodName string

JobAdded(IJobDetail, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.IJobDetail has been added.

public Task JobAdded(IJobDetail jobDetail, CancellationToken cancellationToken = default)

Parameters

jobDetail IJobDetail
cancellationToken CancellationToken

Returns

Task

JobDeleted(JobKey, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.IJobDetail has been deleted.

public Task JobDeleted(JobKey jobKey, CancellationToken cancellationToken = default)

Parameters

jobKey JobKey
cancellationToken CancellationToken

Returns

Task

JobExecutionVetoed(IJobExecutionContext, CancellationToken)

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

public Task JobExecutionVetoed(IJobExecutionContext context, CancellationToken cancellationToken = default)

Parameters

context IJobExecutionContext
cancellationToken CancellationToken

Returns

Task
See Also
JobToBeExecuted(IJobExecutionContext, CancellationToken)

JobInterrupted(JobKey, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.IJobDetail has been interrupted.

public Task JobInterrupted(JobKey jobKey, CancellationToken cancellationToken = default)

Parameters

jobKey JobKey
cancellationToken CancellationToken

Returns

Task

JobPaused(JobKey, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.IJobDetail has been paused.

public Task JobPaused(JobKey jobKey, CancellationToken cancellationToken = default)

Parameters

jobKey JobKey
cancellationToken CancellationToken

Returns

Task

JobResumed(JobKey, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.IJobDetail has been un-paused.

public Task JobResumed(JobKey jobKey, CancellationToken cancellationToken = default)

Parameters

jobKey JobKey
cancellationToken CancellationToken

Returns

Task

JobScheduled(ITrigger, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.IJobDetail is scheduled.

public Task JobScheduled(ITrigger trigger, CancellationToken cancellationToken = default)

Parameters

trigger ITrigger
cancellationToken CancellationToken

Returns

Task

JobToBeExecuted(IJobExecutionContext, CancellationToken)

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

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

public Task JobToBeExecuted(IJobExecutionContext context, CancellationToken cancellationToken = default)

Parameters

context IJobExecutionContext
cancellationToken CancellationToken

Returns

Task
See Also
JobExecutionVetoed(IJobExecutionContext, CancellationToken)

JobUnscheduled(TriggerKey, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.IJobDetail is unscheduled.

public Task JobUnscheduled(TriggerKey triggerKey, CancellationToken cancellationToken = default)

Parameters

triggerKey TriggerKey
cancellationToken CancellationToken

Returns

Task
See Also

JobWasExecuted(IJobExecutionContext, JobExecutionException, CancellationToken)

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

public Task JobWasExecuted(IJobExecutionContext context, JobExecutionException jobException, CancellationToken cancellationToken = default)

Parameters

context IJobExecutionContext
jobException JobExecutionException
cancellationToken CancellationToken

Returns

Task

JobsPaused(string, CancellationToken)

Called by the Quartz.IScheduler when a group of Quartz.IJobDetails has been paused.

If all groups were paused, then the parameter will be null. If all jobs were paused, then both parameters will be null.

public Task JobsPaused(string jobGroup, CancellationToken cancellationToken = default)

Parameters

jobGroup string

The job group.

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task

JobsResumed(string, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.IJobDetail has been un-paused.

public Task JobsResumed(string jobGroup, CancellationToken cancellationToken = default)

Parameters

jobGroup string

The job group.

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task

SchedulerError(string, SchedulerException, CancellationToken)

Called by the Quartz.IScheduler when a serious error has occurred within the scheduler - such as repeated failures in the Quartz.Spi.IJobStore, or the inability to instantiate a Quartz.IJob instance when its Quartz.ITrigger has fired.

public Task SchedulerError(string msg, SchedulerException cause, CancellationToken cancellationToken = default)

Parameters

msg string
cause SchedulerException
cancellationToken CancellationToken

Returns

Task

SchedulerInStandbyMode(CancellationToken)

Called by the Quartz.IScheduler to inform the listener that it has move to standby mode.

public Task SchedulerInStandbyMode(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

SchedulerShutdown(CancellationToken)

Called by the Quartz.IScheduler to inform the listener that it has Shutdown.

public Task SchedulerShutdown(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

SchedulerShuttingdown(CancellationToken)

Called by the Quartz.IScheduler to inform the listener that it has begun the shutdown sequence.

public Task SchedulerShuttingdown(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

SchedulerStarted(CancellationToken)

Called by the Quartz.IScheduler to inform the listener that it has started.

public Task SchedulerStarted(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

SchedulerStarting(CancellationToken)

Called by the Quartz.IScheduler to inform the listener that it is starting.

public Task SchedulerStarting(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

SchedulingDataCleared(CancellationToken)

Called by the Quartz.IScheduler to inform the listener that all jobs, triggers and calendars were deleted.

public Task SchedulingDataCleared(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

Start()

public void Start()

Stop()

public void Stop()

TriggerComplete(ITrigger, IJobExecutionContext, SchedulerInstruction, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.ITrigger has fired, it's associated Quartz.IJobDetail has been executed, and it's Quartz.Spi.IOperableTrigger.Triggered(Quartz.ICalendar) method has been called.

public Task TriggerComplete(ITrigger trigger, IJobExecutionContext context, SchedulerInstruction triggerInstructionCode, CancellationToken cancellationToken = default)

Parameters

trigger ITrigger

The Quartz.ITrigger that was fired.

context IJobExecutionContext

The Quartz.IJobExecutionContext that was passed to the Quartz.IJob'sQuartz.IJob.Execute(Quartz.IJobExecutionContext) method.

triggerInstructionCode SchedulerInstruction

The result of the call on the Quartz.ITrigger'sQuartz.Spi.IOperableTrigger.Triggered(Quartz.ICalendar) method.

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task

TriggerFinalized(ITrigger, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.ITrigger has reached the condition in which it will never fire again.

public Task TriggerFinalized(ITrigger trigger, CancellationToken cancellationToken = default)

Parameters

trigger ITrigger
cancellationToken CancellationToken

Returns

Task

TriggerFired(ITrigger, IJobExecutionContext, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.ITrigger has fired, and it's associated Quartz.IJobDetail is about to be executed.

It is called before the VetoJobExecution(ITrigger, IJobExecutionContext, CancellationToken) method of this interface.

public Task TriggerFired(ITrigger trigger, IJobExecutionContext context, CancellationToken cancellationToken = default)

Parameters

trigger ITrigger

The Quartz.ITrigger that has fired.

context IJobExecutionContext

The Quartz.IJobExecutionContext that will be passed to the Quartz.IJob'sQuartz.IJob.Execute(Quartz.IJobExecutionContext) method.

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task

TriggerMisfired(ITrigger, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.ITrigger has misfired.

Consideration should be given to how much time is spent in this method, as it will affect all triggers that are misfiring. If you have lots of triggers misfiring at once, it could be an issue it this method does a lot.

public Task TriggerMisfired(ITrigger trigger, CancellationToken cancellationToken = default)

Parameters

trigger ITrigger

The Quartz.ITrigger that has misfired.

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task

TriggerPaused(TriggerKey, CancellationToken)

Called by the Quartz.IScheduler a Quartz.ITriggers has been paused.

public Task TriggerPaused(TriggerKey triggerKey, CancellationToken cancellationToken = default)

Parameters

triggerKey TriggerKey
cancellationToken CancellationToken

Returns

Task

TriggerResumed(TriggerKey, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.ITrigger has been un-paused.

public Task TriggerResumed(TriggerKey triggerKey, CancellationToken cancellationToken = default)

Parameters

triggerKey TriggerKey
cancellationToken CancellationToken

Returns

Task

TriggersPaused(string, CancellationToken)

Called by the Quartz.IScheduler a group of Quartz.ITriggers has been paused.

public Task TriggersPaused(string triggerGroup, CancellationToken cancellationToken = default)

Parameters

triggerGroup string

The trigger group.

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task

Remarks

If a all groups were paused, then the parameter will be null.

TriggersResumed(string, CancellationToken)

Called by the Quartz.IScheduler when a group of Quartz.ITriggers has been un-paused.

public Task TriggersResumed(string triggerGroup, CancellationToken cancellationToken = default)

Parameters

triggerGroup string

The trigger group.

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task

Remarks

If all groups were resumed, then the parameter will be null.

VetoJobExecution(ITrigger, IJobExecutionContext, CancellationToken)

Called by the Quartz.IScheduler when a Quartz.ITrigger has fired, and it's associated Quartz.IJobDetail is about to be executed.

It is called after the TriggerFired(ITrigger, IJobExecutionContext, CancellationToken) method of this interface. If the implementation vetoes the execution (via returning true), the job's execute method will not be called.

public Task<bool> VetoJobExecution(ITrigger trigger, IJobExecutionContext context, CancellationToken cancellationToken = default)

Parameters

trigger ITrigger

The Quartz.ITrigger that has fired.

context IJobExecutionContext

The Quartz.IJobExecutionContext that will be passed to the Quartz.IJob'sQuartz.IJob.Execute(Quartz.IJobExecutionContext) method.

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task<bool>

Returns true if job execution should be vetoed, false otherwise.