Table of Contents

Class DashboardAgentConfigurationExtensions

Namespace
Quartz
Assembly
Quartz.Dashboard.Agent.dll

Installs the dashboard agent on a scheduler.

public static class DashboardAgentConfigurationExtensions
Inheritance
DashboardAgentConfigurationExtensions
Inherited Members

Methods

UseDashboardAgent(IQuartzBuilder)

Dials this scheduler out to a dashboard and answers what the dashboard asks of it, configured from the application's configuration alone. Added in 4.8.

public static IQuartzBuilder UseDashboardAgent(this IQuartzBuilder builder)

Parameters

builder IQuartzBuilder

The scheduler's builder.

Returns

IQuartzBuilder

Remarks

Reads Quartz:DashboardAgent — Endpoint, Token, Target, ReadOnly, MaxAccess, HeartbeatInterval, MaxConcurrentOperations and MaxPageSize — from the IConfiguration in the container, or a named scheduler's own Quartz:Schedulers:{name}:DashboardAgent when it has one. An Aspire AppHost's WithReference(dashboard) writes exactly those keys as environment variables.

The delegates — IsJobTypeAllowed, IsOperationAllowed, the token provider and the connection — have no spelling in configuration; set them with the other overload, which reads the same section first. Unset, the agent refuses every job type, as it always has.

UseDashboardAgent(IQuartzBuilder, Action<DashboardAgentOptions>)

Dials this scheduler out to a dashboard and answers what the dashboard asks of it, over one outbound connection the scheduler opens and keeps open.

public static IQuartzBuilder UseDashboardAgent(this IQuartzBuilder builder, Action<DashboardAgentOptions> configure)

Parameters

builder IQuartzBuilder

The scheduler's builder.

configure Action<DashboardAgentOptions>

Where the dashboard is, how to authenticate, and what the agent accepts.

Returns

IQuartzBuilder

Remarks

Use, because the agent is middleware over the scheduler's lifecycle: it starts with the scheduler, reconnects for as long as the scheduler runs, and says goodbye when it shuts down. The dashboard it dials has to accept agents: AddQuartzDashboard(o => o.AcceptAgents(…)).

A scheduler with an agent records its execution history, as a scheduler serving the HTTP API does, because the dashboard's History page reads it through the agent: in memory and bounded by default, in the database with UseExecutionHistory() on a persistent store. It also publishes its live events, which the Live Logs page reads the same way.

Since 4.8 the options start from configuration, as the overload without a callback reads it, and configure runs over them: what code sets wins over what a setting says.