.NET API
TraconSchedulingOptions
Tracon.Abstractions.dllBatch and scheduled run settings.
public sealed class TraconSchedulingOptionsInheritance
Section titled “Inheritance”object ← TraconSchedulingOptions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Read from the Tracon:Scheduling configuration section. See
TraconServiceCollectionExtensions.UseScheduling.
Constructors
Section titled “Constructors”TraconSchedulingOptions()
Section titled “ TraconSchedulingOptions()”public TraconSchedulingOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”The configuration section name.
public const string SectionName = "Tracon:Scheduling"Field Value
Section titled “Field Value”Properties
Section titled “Properties”Enabled
Section titled “ Enabled”Whether the scheduling subsystem is enabled.
public bool Enabled { get; set; }Property Value
Section titled “Property Value”HttpSchedulableHandlerKeys
Section titled “ HttpSchedulableHandlerKeys”The handler keys PUT /api/schedules/{name} accepts. Empty — the
default — means the built-in keys only (JobHandlerKeys.BuiltIn).
public IList<string> HttpSchedulableHandlerKeys { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”A handler key is a dispatch identity, so an unrestricted schedule endpoint would turn every registered handler — including internal ones a consumer registered for its own background work — into an externally callable surface. This list is the opt-in: a consumer that wants its own key schedulable over HTTP names that key here, explicitly.
A non-empty list replaces the built-in default, it
does not extend it. This is deliberate — narrowing the surface (allowing
only JobHandlerKeys.AgentBatch, say) is a thing an
allow-list has to be able to express. The consequence is that a list
naming only a consumer key turns every built-in key off; a
consumer that wants both adds the built-in keys it needs alongside its
own, for example
[.. JobHandlerKeys.BuiltIn, "contoso.nightly-report"].
It restricts only the HTTP schedule endpoint. Code paths inside the
process (IJobDispatcher, the built-in producers) are not
affected, and neither is reading: GET /api/jobs?handlerKey=
still returns jobs of any key the caller’s tenant owns.
LaneByHandlerKey
Section titled “ LaneByHandlerKey”Maps a handler key to the lane its jobs are queued under, when the caller did not set JobRecord.Lane/JobSchedule.Lane explicitly.
public IDictionary<string, string> LaneByHandlerKey { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Applied once, inside IJobStore.EnqueueAsync: a job whose
Lane is still JobLanes.Default at enqueue time is
routed through this map by its JobRecord.HandlerKey. This
lets an operator isolate one kind of work (for example
JobHandlerKeys.Retention, or a consumer’s own key) into
its own lane without changing any call site that creates those jobs.
The lanes this worker leases from. null (the default) leases from every lane — the same behavior as before lanes existed.
public IReadOnlyList<string>? Lanes { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”A worker that only wants to run a specific lane’s jobs in a dedicated
process sets this instead of registering a second
JobWorkerBackgroundService: the background service is a single
TryAddEnumerable registration keyed by implementation type, so a
second host process with its own TraconSchedulingOptions.Lanes value is the
supported way to dedicate capacity, not a second in-process worker.
LeaseDuration
Section titled “ LeaseDuration”A job’s lease duration. If the worker does not finish within this time, the job may be re-leased.
public TimeSpan LeaseDuration { get; set; }Property Value
Section titled “Property Value”MaxAttempts
Section titled “ MaxAttempts”The maximum number of attempts a job may make before becoming JobStatus.Failed.
public int MaxAttempts { get; set; }Property Value
Section titled “Property Value”MaxConcurrentJobs
Section titled “ MaxConcurrentJobs”The maximum number of jobs that may run concurrently in this process.
public int MaxConcurrentJobs { get; set; }Property Value
Section titled “Property Value”MaxConcurrentJobsPerLane
Section titled “ MaxConcurrentJobsPerLane”Per-lane concurrency limits. A lane not listed here shares the common TraconSchedulingOptions.MaxConcurrentJobs budget.
public IDictionary<string, int> MaxConcurrentJobsPerLane { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The sum of these values is allowed to exceed TraconSchedulingOptions.MaxConcurrentJobs: each listed lane gets its own dedicated budget, on top of the shared one that unlisted lanes still draw from. There is no combined cap.
If TraconSchedulingOptions.Lanes is left null (unrestricted)
while this dictionary is non-empty, the worker’s effective coverage
narrows to JobLanes.Default plus the lanes listed here —
it does not also lease from an arbitrary lane nobody
configured a budget for. This keeps the “which lanes get how much
capacity” question answerable from this dictionary alone; a job queued
under an unlisted, non-default lane simply is not leased by this
worker (it stays visible in GET /api/jobs?lane= and the jobs
screen). Set TraconSchedulingOptions.Lanes explicitly to include such a lane.
MaxItemsPerJob
Section titled “ MaxItemsPerJob”The maximum number of items allowed in a single job.
public int MaxItemsPerJob { get; set; }Property Value
Section titled “Property Value”PollInterval
Section titled “ PollInterval”How often new jobs and due schedules are looked for.
public TimeSpan PollInterval { get; set; }Property Value
Section titled “Property Value”RunWorker
Section titled “ RunWorker”Whether the background worker runs in this process. If set to false, the queue and schedule stores keep working, but no job is leased or executed in this process — distribution is left to another process.
public bool RunWorker { get; set; }