Table of Contents

Interface IQuartzApiClient

Namespace
Quartz.Dashboard.Services
Assembly
Quartz.Dashboard.dll

The data source behind the dashboard's pages: either the schedulers in this process or a Quartz HTTP API somewhere else.

public interface IQuartzApiClient

Remarks

This is the dashboard's own projection of the HTTP API, not the wire contract itself — it is shaped for the pages that read it, and it is public so that an application can replace it. It speaks Quartz's vocabulary throughout: TriggerState and SchedulerStatus rather than strings, JobKeyDto and TriggerKeyDto rather than loose group/name pairs, PagedQuery's Skip/Take with PagedResult<T> rather than a paging model of its own, and ITrigger, ICalendar and JobDataMap rather than JSON.

The verbs are IScheduler's own, spelled the same way: an operation this interface forwards carries the name the scheduler gives it — Start(string, CancellationToken), Interrupt(string, JobKeyDto, CancellationToken), one TriggerJob(string, JobKeyDto, JobDataMap?, CancellationToken) with an optional map, and the Query* family for the paged listings. Only what has no counterpart on IScheduler — the scheduler listing, the execution history — names itself.

A mutation that can find nothing to act on answers with the scheduler's own bool: whether it applied. Every such member reports it, because a name shared with IScheduler that dropped the answer would read as the same operation and quietly not be one — and a page cannot tell "deleted" from "was already gone" without it.

A trigger and a calendar arrive as themselves because Quartz already owns the polymorphism they need: the serializer registry maps each kind to its own serializer, custom kinds an application registered included, and the wire format is that discriminated shape. A DTO family of the dashboard's own would have to be extended for every trigger kind and would still not describe a kind it had never heard of.

Missing things. Every member that takes a schedulerName raises KeyNotFoundException when no scheduler goes by that name, and the four members that return the thing itself rather than a listing — GetScheduler(string, CancellationToken), GetJobDetail(string, JobKeyDto, CancellationToken), GetTrigger(string, TriggerKeyDto, CancellationToken) and GetCalendar(string, string, CancellationToken) — raise it again when the thing is gone. Their return types are non-nullable, so there is no other answer available to them, and the dashboard's error boundary renders that exception as the "not found" page. A replacement that answered null! instead would fault the page with a NullReferenceException somewhere further in.

Things this data source cannot report. A capability the source does not have is a value, not an exception: GetExecutionLimits(string, CancellationToken) answers CannotReport where the underlying scheduler refuses with NotSupportedException, because "this source cannot say" and "nothing is limited" are different facts and the overview draws them differently.

Additivity. This interface is frozen from 4.0.0-beta.1 in the sense the release promises: a member added to it in 4.x arrives as a default interface member, so an implementation of an application's own keeps compiling. Its default body reports the datum as unavailable the way CannotReport does, rather than inventing one.

Methods

AddCalendar(string, AddCalendarRequest, CancellationToken)

Stores a calendar under a name, which triggers refer to in order to exclude times from firing.

ValueTask AddCalendar(string schedulerName, AddCalendarRequest request, CancellationToken cancellationToken = default)

Parameters

schedulerName string
request AddCalendarRequest
cancellationToken CancellationToken

Returns

ValueTask

AddJob(string, AddJobRequest, CancellationToken)

Stores a job with no trigger, for one that is triggered by hand or scheduled later.

ValueTask AddJob(string schedulerName, AddJobRequest request, CancellationToken cancellationToken = default)

Parameters

schedulerName string
request AddJobRequest
cancellationToken CancellationToken

Returns

ValueTask

Backfill(string, TriggerKeyDto, DateTimeOffset, DateTimeOffset, BackfillOptions, CancellationToken)

Schedules one firing of the trigger's job for each slot the trigger had in [from, until), as Backfill(IScheduler, TriggerKey, DateTimeOffset, DateTimeOffset, BackfillOptions, CancellationToken) does.

ValueTask<BackfillResult> Backfill(string schedulerName, TriggerKeyDto triggerKey, DateTimeOffset from, DateTimeOffset until, BackfillOptions options = default, CancellationToken cancellationToken = default)

Parameters

schedulerName string

The scheduler holding the trigger.

triggerKey TriggerKeyDto

The trigger whose schedule to backfill.

from DateTimeOffset

The start of the range, included.

until DateTimeOffset

The end of the range, excluded: the extension's to, named so that no .NET language reads it as a keyword.

options BackfillOptions

How many slots may be scheduled, their spacing and their execution group.

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask<BackfillResult>

Remarks

What the Trigger Detail page's Backfill… dialog submits. A refusal — a range that is empty or ends after now, more slots than MaxSlots — arrives as the ArgumentException the extension raised, and the dialog shows its message.

A default interface member, added in 4.3. The default reports the operation as unavailable with NotSupportedException, and the page disables the button with the reason.

CountMisfires(string, DateTimeOffset, CancellationToken)

Counts the misfires the scheduler has recorded since since.

ValueTask<int> CountMisfires(string schedulerName, DateTimeOffset since, CancellationToken cancellationToken = default)

Parameters

schedulerName string
since DateTimeOffset
cancellationToken CancellationToken

Returns

ValueTask<int>

Remarks

A count rather than a page, because the overview's tile asks "how bad is it right now" and a store keeping its history in a database can answer that without loading rows it would discard.

DeleteCalendar(string, string, CancellationToken)

Deletes the calendar. Returns true when it existed and was deleted, false when there was nothing to delete.

ValueTask<bool> DeleteCalendar(string schedulerName, string calendarName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
calendarName string
cancellationToken CancellationToken

Returns

ValueTask<bool>

DeleteJob(string, JobKeyDto, CancellationToken)

Deletes the job and every trigger that fires it. Returns true when the job existed and was deleted, false when there was nothing to delete.

ValueTask<bool> DeleteJob(string schedulerName, JobKeyDto jobKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
jobKey JobKeyDto
cancellationToken CancellationToken

Returns

ValueTask<bool>

GetCalendar(string, string, CancellationToken)

Returns the calendar itself, of whichever kind it is.

ValueTask<ICalendar> GetCalendar(string schedulerName, string calendarName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
calendarName string
cancellationToken CancellationToken

Returns

ValueTask<ICalendar>

Exceptions

KeyNotFoundException

No scheduler goes by schedulerName, or it holds no calendar named calendarName.

GetCalendarNames(string, CancellationToken)

Returns the names of every calendar the scheduler holds — a short list rather than a page.

ValueTask<List<string>> GetCalendarNames(string schedulerName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
cancellationToken CancellationToken

Returns

ValueTask<List<string>>

GetExecution(string, string, CancellationToken)

Returns one execution, its captured Log included, or null when the scheduler has no row by that EntryId.

ValueTask<DashboardHistoryEntry?> GetExecution(string schedulerName, string entryId, CancellationToken cancellationToken = default)

Parameters

schedulerName string

The scheduler the execution belongs to.

entryId string

The row's EntryId.

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask<DashboardHistoryEntry>

Remarks

What the execution-detail page reads. A source that cannot reach the history at all raises NotSupportedException, as QueryExecutions(DashboardHistoryQuery, CancellationToken) does for it.

A default interface member, added in 4.3. The default reads the scheduler's whole history through QueryExecutions(DashboardHistoryQuery, CancellationToken) and picks the row out, so an implementation of an application's own answers truthfully without declaring it — with whatever log its listing carries.

GetExecutionLimits(string, CancellationToken)

Returns the execution limits the scheduler is running with, or CannotReport when this data source cannot say.

ValueTask<ExecutionLimitsDto> GetExecutionLimits(string schedulerName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
cancellationToken CancellationToken

Returns

ValueTask<ExecutionLimitsDto>

Remarks

Never null: a scheduler with nothing limited answers with an empty Limits, which is a different fact from a scheduler that cannot report limits at all, and the overview says which of the two it is looking at.

GetJobDetail(string, JobKeyDto, CancellationToken)

Returns the job's definition — its type, its durability and its data map.

ValueTask<JobDetailDto> GetJobDetail(string schedulerName, JobKeyDto jobKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
jobKey JobKeyDto
cancellationToken CancellationToken

Returns

ValueTask<JobDetailDto>

Exceptions

KeyNotFoundException

No scheduler goes by schedulerName, or it holds no job under jobKey.

GetJobGroupPause(string, string, CancellationToken)

Why the job group is paused, who asked and when, or null when it is not paused or its pause recorded nothing — what GetJobGroupPause(string, CancellationToken) answers.

ValueTask<PauseInfo?> GetJobGroupPause(string schedulerName, string groupName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
groupName string
cancellationToken CancellationToken

Returns

ValueTask<PauseInfo>

Remarks

A default interface member, added in 4.3, whose default reports the datum as unavailable: null.

GetJobRunStatus(string, JobKeyDto, CancellationToken)

How the job's runs have gone — its last run, last success and failure, and how many occurrences in a row have failed — or null when no run of it has been recorded.

ValueTask<JobRunStatus?> GetJobRunStatus(string schedulerName, JobKeyDto jobKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string

The scheduler the job belongs to.

jobKey JobKeyDto

The job.

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask<JobRunStatus>

Remarks

What the Job Detail page's status panel reads, from the scheduler's execution history as GetJobRunStatus(string, JobKey, CancellationToken) answers it. A history that keeps no per-job status raises NotSupportedException, and the page leaves the panel out.

A default interface member, added in 4.4. The default reports the datum as unavailable with NotSupportedException.

GetJobRunStatuses(string, IReadOnlyCollection<JobKeyDto>, CancellationToken)

The run statuses of jobKeys, by job group and then name. A job with no recorded run is absent.

ValueTask<List<JobRunStatus>> GetJobRunStatuses(string schedulerName, IReadOnlyCollection<JobKeyDto> jobKeys, CancellationToken cancellationToken = default)

Parameters

schedulerName string

The scheduler the jobs belong to.

jobKeys IReadOnlyCollection<JobKeyDto>

The jobs.

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask<List<JobRunStatus>>

Remarks

What the Jobs page reads, once per page, for its last-run, last-success and failing columns. A history that keeps no per-job status raises NotSupportedException, and the page leaves the columns out.

A default interface member, added in 4.4. The default reports the datum as unavailable with NotSupportedException.

GetScheduler(string, CancellationToken)

Returns one scheduler with the metadata it was built with. Only a scheduler that exists can answer; a registration nothing has built is reported by GetSchedulers(CancellationToken) and has no detail to read.

ValueTask<SchedulerDetailDto> GetScheduler(string schedulerName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
cancellationToken CancellationToken

Returns

ValueTask<SchedulerDetailDto>

Exceptions

KeyNotFoundException

No scheduler goes by schedulerName.

GetSchedulers(CancellationToken)

Returns every scheduler the container knows about, ordered by name — the registrations included, so a scheduler nothing has built yet is listed with a null Status rather than being invisible.

ValueTask<List<SchedulerHeaderDto>> GetSchedulers(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

ValueTask<List<SchedulerHeaderDto>>

Remarks

Nothing is created by asking. That is why the listing is the registrations rather than the repository: an operator enumerating tenants must not start every one of them.

GetTrigger(string, TriggerKeyDto, CancellationToken)

Returns the trigger itself — a ICronTrigger, ISimpleTrigger or whichever kind it is, including one an application registered its own serializer for.

ValueTask<ITrigger> GetTrigger(string schedulerName, TriggerKeyDto triggerKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKey TriggerKeyDto
cancellationToken CancellationToken

Returns

ValueTask<ITrigger>

Exceptions

KeyNotFoundException

No scheduler goes by schedulerName, or it holds no trigger under triggerKey.

GetTriggerPause(string, TriggerKeyDto, CancellationToken)

Why the trigger is paused, who asked and when, or null when it is not paused or its pause recorded nothing — what GetTriggerPause(TriggerKey, CancellationToken) answers.

ValueTask<PauseInfo?> GetTriggerPause(string schedulerName, TriggerKeyDto triggerKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKey TriggerKeyDto
cancellationToken CancellationToken

Returns

ValueTask<PauseInfo>

Remarks

A default interface member, added in 4.3, whose default reports the datum as unavailable: null.

GetTriggerState(string, TriggerKeyDto, CancellationToken)

Returns the trigger's state, which is None when there is no such trigger — the one read here that answers rather than raising.

ValueTask<TriggerState> GetTriggerState(string schedulerName, TriggerKeyDto triggerKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKey TriggerKeyDto
cancellationToken CancellationToken

Returns

ValueTask<TriggerState>

GetTriggersOfJob(string, JobKeyDto, CancellationToken)

Returns every trigger scheduled against the job, which is a short list rather than a page: a job has as many triggers as somebody wrote for it.

ValueTask<List<TriggerHeaderDto>> GetTriggersOfJob(string schedulerName, JobKeyDto jobKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
jobKey JobKeyDto
cancellationToken CancellationToken

Returns

ValueTask<List<TriggerHeaderDto>>

GetUpcomingFireTimes(string, TriggerKeyDto, int, CancellationToken)

The trigger's next count fire times, in UTC and earliest first, as GetUpcomingFireTimes(IScheduler, TriggerKey, int, CancellationToken) answers them: from its next fire time, in its own time zone, less what its calendar excludes and up to its end time. Empty for a trigger that does not fire again, and only the next for a simple trigger that measures its interval from completion.

ValueTask<List<DateTimeOffset>> GetUpcomingFireTimes(string schedulerName, TriggerKeyDto triggerKey, int count, CancellationToken cancellationToken = default)

Parameters

schedulerName string

The scheduler holding the trigger.

triggerKey TriggerKeyDto

The trigger.

count int

How many fire times to answer at most, from 1 to 100.

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask<List<DateTimeOffset>>

Remarks

What every Trigger Detail page's Upcoming fires panel reads.

A default interface member, added in 4.7. The default reads the trigger through GetTrigger(string, TriggerKeyDto, CancellationToken) and the calendar it names through GetCalendar(string, string, CancellationToken), and computes from them, so an implementation of an application's own answers truthfully without declaring it.

Exceptions

KeyNotFoundException

No scheduler goes by schedulerName, or it holds no trigger under triggerKey.

ArgumentOutOfRangeException

count is less than 1 or more than 100.

Interrupt(string, JobKeyDto, CancellationToken)

Interrupts every execution of the job: on the server's node, and, with a clustered persistent store, on every other node, by recording a request that node acts on after its next check-in. Returns true when at least one execution was asked to stop, false when the job was not running.

ValueTask<bool> Interrupt(string schedulerName, JobKeyDto jobKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
jobKey JobKeyDto
cancellationToken CancellationToken

Returns

ValueTask<bool>

Remarks

A job that does not watch its cancellation token runs to completion regardless, so the flag says the interrupt was delivered or requested rather than that the work stopped.

InterruptFireInstance(string, string, CancellationToken)

Interrupts one execution, named by its fire instance id. Returns true when that execution was found and asked to stop, false when it had already finished, or belongs to another node of a store that is not clustered.

ValueTask<bool> InterruptFireInstance(string schedulerName, string fireInstanceId, CancellationToken cancellationToken = default)

Parameters

schedulerName string
fireInstanceId string
cancellationToken CancellationToken

Returns

ValueTask<bool>

Remarks

The single-execution form of Interrupt(string, JobKeyDto, CancellationToken), which interrupts every execution of the job. With a clustered persistent store, a firing owned by another node gets a request that node acts on after its next check-in; otherwise it is interrupted by asking that node.

PauseAll(string, CancellationToken)

Pauses every trigger group, so nothing fires until ResumeAll(string, CancellationToken).

ValueTask PauseAll(string schedulerName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
cancellationToken CancellationToken

Returns

ValueTask

PauseAllWith(string, PauseDetails?, CancellationToken)

ValueTask PauseAllWith(string schedulerName, PauseDetails? details, CancellationToken cancellationToken = default)

Parameters

schedulerName string
details PauseDetails
cancellationToken CancellationToken

Returns

ValueTask

Remarks

A default interface member, added in 4.3. The default drops the details and calls PauseAll(string, CancellationToken).

PauseJob(string, JobKeyDto, CancellationToken)

Pauses the job. Returns true when the job existed and was paused, false when there was nothing to pause.

ValueTask<bool> PauseJob(string schedulerName, JobKeyDto jobKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
jobKey JobKeyDto
cancellationToken CancellationToken

Returns

ValueTask<bool>

PauseJobWith(string, JobKeyDto, PauseDetails?, CancellationToken)

ValueTask<bool> PauseJobWith(string schedulerName, JobKeyDto jobKey, PauseDetails? details, CancellationToken cancellationToken = default)

Parameters

schedulerName string
jobKey JobKeyDto
details PauseDetails
cancellationToken CancellationToken

Returns

ValueTask<bool>

Remarks

A default interface member, added in 4.3. The default drops the details and calls PauseJob(string, JobKeyDto, CancellationToken).

PauseJobsWith(string, IReadOnlyCollection<JobKeyDto>, PauseDetails?, CancellationToken)

Pauses every job in jobKeys, recording why and who asked on each trigger it pauses, as PauseJobsWith(IReadOnlyCollection<JobKey>, PauseDetails?, CancellationToken) does, and answers with the keys that named a job.

ValueTask<List<JobKeyDto>> PauseJobsWith(string schedulerName, IReadOnlyCollection<JobKeyDto> jobKeys, PauseDetails? details, CancellationToken cancellationToken = default)

Parameters

schedulerName string
jobKeys IReadOnlyCollection<JobKeyDto>
details PauseDetails
cancellationToken CancellationToken

Returns

ValueTask<List<JobKeyDto>>

Remarks

A default interface member, added in 4.4. The default calls PauseJob(string, JobKeyDto, CancellationToken) once per key when the details say nothing, and PauseJobWith(string, JobKeyDto, PauseDetails?, CancellationToken) otherwise.

PauseTrigger(string, TriggerKeyDto, CancellationToken)

Pauses the trigger. Returns true when the trigger existed and was moved into the paused state, false when there was nothing to pause.

ValueTask<bool> PauseTrigger(string schedulerName, TriggerKeyDto triggerKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKey TriggerKeyDto
cancellationToken CancellationToken

Returns

ValueTask<bool>

PauseTriggerWith(string, TriggerKeyDto, PauseDetails?, CancellationToken)

ValueTask<bool> PauseTriggerWith(string schedulerName, TriggerKeyDto triggerKey, PauseDetails? details, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKey TriggerKeyDto
details PauseDetails
cancellationToken CancellationToken

Returns

ValueTask<bool>

Remarks

A default interface member, added in 4.3. The default drops the details and calls PauseTrigger(string, TriggerKeyDto, CancellationToken), so an implementation of an application's own still pauses.

PauseTriggers(string, IReadOnlyCollection<TriggerKeyDto>, CancellationToken)

Pauses every trigger in triggerKeys, as PauseTriggers(IReadOnlyCollection<TriggerKey>, CancellationToken) does, and answers with the keys it paused. A key that names no trigger, or one already paused, is absent from the answer.

ValueTask<List<TriggerKeyDto>> PauseTriggers(string schedulerName, IReadOnlyCollection<TriggerKeyDto> triggerKeys, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKeys IReadOnlyCollection<TriggerKeyDto>
cancellationToken CancellationToken

Returns

ValueTask<List<TriggerKeyDto>>

Remarks

A default interface member, added in 4.3. The default calls PauseTrigger(string, TriggerKeyDto, CancellationToken) once per key, which is the same answer in as many calls as there are keys.

PauseTriggersWith(string, IReadOnlyCollection<TriggerKeyDto>, PauseDetails?, CancellationToken)

ValueTask<List<TriggerKeyDto>> PauseTriggersWith(string schedulerName, IReadOnlyCollection<TriggerKeyDto> triggerKeys, PauseDetails? details, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKeys IReadOnlyCollection<TriggerKeyDto>
details PauseDetails
cancellationToken CancellationToken

Returns

ValueTask<List<TriggerKeyDto>>

Remarks

What the Triggers page's Pause selected makes: one call for the selection, whatever the prompt was told.

A default interface member, added in 4.4. Details that say nothing go to PauseTriggers(string, IReadOnlyCollection<TriggerKeyDto>, CancellationToken). Otherwise the default calls PauseTriggerWith(string, TriggerKeyDto, PauseDetails?, CancellationToken) once per key, so an implementation written against 4.3 still records the reason.

QueryClusterNodes(string, CancellationToken)

Returns the scheduler's cluster nodes, the node that answered first. A scheduler that is not clustered answers with the one node it is, with no check-in times.

ValueTask<List<ClusterNodeDto>> QueryClusterNodes(string schedulerName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
cancellationToken CancellationToken

Returns

ValueTask<List<ClusterNodeDto>>

Remarks

Joins to QueryFireInstances(string, DashboardFireInstanceQuery, CancellationToken) on SchedulerInstanceId, which is how the Cluster page counts what each node is running.

QueryExecutionStatistics(ExecutionStatisticsQuery, CancellationToken)

The scheduler's runs, counted by result and timed in buckets of fire time, as QueryExecutionStatistics(ExecutionStatisticsQuery, CancellationToken) answers it.

ValueTask<ExecutionStatistics> QueryExecutionStatistics(ExecutionStatisticsQuery query, CancellationToken cancellationToken = default)

Parameters

query ExecutionStatisticsQuery

Which runs to count, and the bucket size.

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask<ExecutionStatistics>

Remarks

What the History and Job Detail pages chart. A source that cannot count raises NotSupportedException, and the pages leave the chart out.

A default interface member, added in 4.4. The default reports the datum as unavailable with NotSupportedException.

QueryExecutions(DashboardHistoryQuery, CancellationToken)

Returns one page of execution history, newest first.

ValueTask<PagedResult<DashboardHistoryEntry>> QueryExecutions(DashboardHistoryQuery query, CancellationToken cancellationToken = default)

Parameters

query DashboardHistoryQuery
cancellationToken CancellationToken

Returns

ValueTask<PagedResult<DashboardHistoryEntry>>

Remarks

The history is IDashboardHistoryStore's, and that store always answers: a store holding nothing returns an empty page, which is what "no executions recorded" is. This used to be nullable because the deleted remote client turned a 404 into "no history at all", and nothing in this process has ever had that answer to give.

QueryFireInstances(string, DashboardFireInstanceQuery, CancellationToken)

Returns one page of firings — by default the ones that are running — ordered by trigger group, then trigger name, then fire instance id. With a persistent job store this covers the whole cluster, so a firing owned by another node is listed too, marked with that node's SchedulerInstanceId.

ValueTask<PagedResult<FireInstanceDto>> QueryFireInstances(string schedulerName, DashboardFireInstanceQuery query, CancellationToken cancellationToken = default)

Parameters

schedulerName string
query DashboardFireInstanceQuery
cancellationToken CancellationToken

Returns

ValueTask<PagedResult<FireInstanceDto>>

QueryJobGroups(string, DashboardGroupQuery, CancellationToken)

Returns one page of job groups, ordered by name, each carrying whether it is paused.

ValueTask<PagedResult<JobGroupDto>> QueryJobGroups(string schedulerName, DashboardGroupQuery query, CancellationToken cancellationToken = default)

Parameters

schedulerName string
query DashboardGroupQuery
cancellationToken CancellationToken

Returns

ValueTask<PagedResult<JobGroupDto>>

QueryJobs(string, DashboardJobQuery, CancellationToken)

Returns one page of jobs, ordered by group and then name. The page always reports HasMore and, because the dashboard asks for it, a TotalCount.

ValueTask<PagedResult<JobKeyDto>> QueryJobs(string schedulerName, DashboardJobQuery query, CancellationToken cancellationToken = default)

Parameters

schedulerName string
query DashboardJobQuery
cancellationToken CancellationToken

Returns

ValueTask<PagedResult<JobKeyDto>>

QueryMisfires(DashboardMisfireQuery, CancellationToken)

Returns one page of the triggers that missed a firing, newest first.

ValueTask<PagedResult<DashboardMisfireEntry>> QueryMisfires(DashboardMisfireQuery query, CancellationToken cancellationToken = default)

Parameters

query DashboardMisfireQuery
cancellationToken CancellationToken

Returns

ValueTask<PagedResult<DashboardMisfireEntry>>

Remarks

The history is IDashboardHistoryStore's, and that store always answers: a store holding nothing returns an empty page, which is what "no executions recorded" is. This used to be nullable because the deleted remote client turned a 404 into "no history at all", and nothing in this process has ever had that answer to give.

QueryTriggerGroups(string, DashboardGroupQuery, CancellationToken)

Returns one page of trigger groups, ordered by name, each carrying whether it is paused.

ValueTask<PagedResult<TriggerGroupDto>> QueryTriggerGroups(string schedulerName, DashboardGroupQuery query, CancellationToken cancellationToken = default)

Parameters

schedulerName string
query DashboardGroupQuery
cancellationToken CancellationToken

Returns

ValueTask<PagedResult<TriggerGroupDto>>

QueryTriggers(string, DashboardTriggerQuery, CancellationToken)

Returns one page of triggers, ordered by group and then name, each carrying its state and execution group.

ValueTask<PagedResult<TriggerHeaderDto>> QueryTriggers(string schedulerName, DashboardTriggerQuery query, CancellationToken cancellationToken = default)

Parameters

schedulerName string
query DashboardTriggerQuery
cancellationToken CancellationToken

Returns

ValueTask<PagedResult<TriggerHeaderDto>>

RescheduleJob(string, TriggerKeyDto, RescheduleRequest, CancellationToken)

Replaces the trigger with the one in the request, keeping the job it fires.

ValueTask RescheduleJob(string schedulerName, TriggerKeyDto triggerKey, RescheduleRequest request, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKey TriggerKeyDto
request RescheduleRequest
cancellationToken CancellationToken

Returns

ValueTask

ResetTriggerFromErrorState(string, TriggerKeyDto, CancellationToken)

Resets the trigger from the error state. Returns true when the trigger existed in the error state and was reset, false otherwise.

ValueTask<bool> ResetTriggerFromErrorState(string schedulerName, TriggerKeyDto triggerKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKey TriggerKeyDto
cancellationToken CancellationToken

Returns

ValueTask<bool>

ResumeAll(string, CancellationToken)

Resumes every trigger group, applying each trigger's misfire instruction to what it missed.

ValueTask ResumeAll(string schedulerName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
cancellationToken CancellationToken

Returns

ValueTask

ResumeJob(string, JobKeyDto, CancellationToken)

Resumes the job. Returns true when the job existed and was resumed, false when there was nothing to resume.

ValueTask<bool> ResumeJob(string schedulerName, JobKeyDto jobKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
jobKey JobKeyDto
cancellationToken CancellationToken

Returns

ValueTask<bool>

ResumeTrigger(string, TriggerKeyDto, CancellationToken)

Resumes the trigger. Returns true when the trigger existed in a paused state and was resumed, false when there was nothing to resume.

ValueTask<bool> ResumeTrigger(string schedulerName, TriggerKeyDto triggerKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKey TriggerKeyDto
cancellationToken CancellationToken

Returns

ValueTask<bool>

ResumeTriggers(string, IReadOnlyCollection<TriggerKeyDto>, CancellationToken)

Resumes every trigger in triggerKeys, as ResumeTriggers(IReadOnlyCollection<TriggerKey>, CancellationToken) does, and answers with the keys it resumed. A key that names no trigger, or one that was not paused, is absent from the answer.

ValueTask<List<TriggerKeyDto>> ResumeTriggers(string schedulerName, IReadOnlyCollection<TriggerKeyDto> triggerKeys, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKeys IReadOnlyCollection<TriggerKeyDto>
cancellationToken CancellationToken

Returns

ValueTask<List<TriggerKeyDto>>

Remarks

A default interface member, added in 4.3. The default calls ResumeTrigger(string, TriggerKeyDto, CancellationToken) once per key.

ScheduleJob(string, ScheduleJobRequest, CancellationToken)

Schedules a trigger, together with the job it fires when the request carries one.

ValueTask ScheduleJob(string schedulerName, ScheduleJobRequest request, CancellationToken cancellationToken = default)

Parameters

schedulerName string
request ScheduleJobRequest
cancellationToken CancellationToken

Returns

ValueTask

Shutdown(string, CancellationToken)

Shuts the scheduler down, waiting for the jobs in flight. A scheduler that has shut down cannot be started again.

ValueTask Shutdown(string schedulerName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
cancellationToken CancellationToken

Returns

ValueTask

Standby(string, CancellationToken)

Puts the scheduler in standby: it keeps its state and stops firing until it is started again.

ValueTask Standby(string schedulerName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
cancellationToken CancellationToken

Returns

ValueTask

Start(string, CancellationToken)

Starts the scheduler, so its triggers begin firing.

ValueTask Start(string schedulerName, CancellationToken cancellationToken = default)

Parameters

schedulerName string
cancellationToken CancellationToken

Returns

ValueTask

TriggerJob(string, JobKeyDto, JobDataMap?, CancellationToken)

Triggers the job once, with jobDataMap merged over the job's own data for that one firing when a map is given.

ValueTask TriggerJob(string schedulerName, JobKeyDto jobKey, JobDataMap? jobDataMap = null, CancellationToken cancellationToken = default)

Parameters

schedulerName string
jobKey JobKeyDto
jobDataMap JobDataMap
cancellationToken CancellationToken

Returns

ValueTask

Remarks

One method with an optional map, exactly as TriggerJob(JobKey, JobDataMap?, CancellationToken) is: firing a job with data and firing it without are the same operation, and the pair of methods this replaces made them look like two.

UnscheduleJob(string, TriggerKeyDto, CancellationToken)

Removes the trigger, and the job it fired if that job is not durable and has no triggers left. Returns true when the trigger existed and was removed, false when there was nothing to remove.

ValueTask<bool> UnscheduleJob(string schedulerName, TriggerKeyDto triggerKey, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKey TriggerKeyDto
cancellationToken CancellationToken

Returns

ValueTask<bool>

UnscheduleJobs(string, IReadOnlyCollection<TriggerKeyDto>, CancellationToken)

Removes every trigger in triggerKeys, as UnscheduleJobs(IReadOnlyCollection<TriggerKey>, CancellationToken) does, and answers with the keys it removed. A key that names no trigger is absent from the answer.

ValueTask<List<TriggerKeyDto>> UnscheduleJobs(string schedulerName, IReadOnlyCollection<TriggerKeyDto> triggerKeys, CancellationToken cancellationToken = default)

Parameters

schedulerName string
triggerKeys IReadOnlyCollection<TriggerKeyDto>
cancellationToken CancellationToken

Returns

ValueTask<List<TriggerKeyDto>>

Remarks

A default interface member, added in 4.3. The default calls UnscheduleJob(string, TriggerKeyDto, CancellationToken) once per key.

UpdateTriggerDetails(string, TriggerKeyDto, TriggerDetailsUpdate, CancellationToken)

Edits the trigger in place, as UpdateTriggerDetails(TriggerKey, TriggerDetailsUpdate, CancellationToken) does: only what update names changes, and the fire times and the state are kept. Returns true when the trigger existed and was updated, false when there was nothing to update.

ValueTask<bool> UpdateTriggerDetails(string schedulerName, TriggerKeyDto triggerKey, TriggerDetailsUpdate update, CancellationToken cancellationToken = default)

Parameters

schedulerName string

The scheduler holding the trigger.

triggerKey TriggerKeyDto

The trigger to edit.

update TriggerDetailsUpdate

What to change. See TriggerDetailsUpdate.

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask<bool>

Remarks

What the Trigger Detail page's editor saves through. A refusal by the scheduler — a calendar it does not hold, a misfire instruction of another family, an overlap policy for a trigger type that cannot carry one — arrives as the exception the scheduler raised, and the page shows its message beside the fields.

A default interface member, added in 4.3. The default reports the operation as unavailable with NotSupportedException: nothing else on this interface edits a trigger without replacing it, so it cannot be built out of the other members, and the page disables its editor with the reason rather than pretending.