TickerQTickerQ
GuidesDefining Jobs

Priorities

Control execution priority and thread allocation.

Set priority on the function definition — via the attribute or the builder.

Priority levels

PriorityBehaviour
LongRunningRuns on a dedicated thread via TaskCreationOptions.LongRunning. Does not count against MaxConcurrency.
HighSame worker pool as Normal — metadata for dashboard and tracing.
NormalDefault.
LowSame worker pool as Normal — metadata for dashboard and tracing.

Setting priority

Via attribute

[TickerFunction("index-rebuild", taskPriority: TickerTaskPriority.LongRunning)]
public async Task RebuildIndex(TickerFunctionContext ctx, CancellationToken ct) { ... }

Via builder

Program.cs
builder.Services.MapTicker<RebuildJob>()
    .WithPriority(TickerTaskPriority.LongRunning);

Via group

Program.cs
builder.Services.MapTickerGroup("Critical", group =>
{
    group.WithPriority(TickerTaskPriority.High);
    group.MapTicker<PaymentJob>();
    group.MapTicker<FraudCheckJob>();
});

Priority is set on the function, not on individual scheduled jobs. All scheduled instances of a function share the same priority.

On this page