TickerQTickerQ
GuidesDefining Jobs

Function Groups

Organize related functions under a shared prefix with defaults.

Available in version *.3.0 or later.

MapTickerGroup registers related functions under a shared name prefix and applies default settings to all of them.

Program.cs
builder.Services.MapTickerGroup("Billing", group =>
{
    group.WithPriority(TickerTaskPriority.High);
    group.WithMaxConcurrency(4);
    group.WithLifetime(ServiceLifetime.Scoped);

    group.MapTicker<ChargeJob>();       //"Billing.ChargeJob"
    group.MapTicker<RefundJob>();       //"Billing.RefundJob"
});

Group defaults

MethodDescription
.WithPriority(TickerTaskPriority)Default priority for all functions in the group
.WithMaxConcurrency(int)Default concurrency limit
.WithLifetime(ServiceLifetime)DI lifetime (Scoped, Transient, Singleton)

Per-function overrides

Individual functions can chain builder options to override group defaults:

Program.cs
builder.Services.MapTickerGroup("Reports", group =>
{
    group.WithPriority(TickerTaskPriority.Normal);

    group.MapTicker<DailyReportJob>()
         .WithCron("0 9 * * *")
         .WithPriority(TickerTaskPriority.High);    // overrides group default

    group.MapTicker<WeeklyReportJob>()
         .WithCron("0 9 * * 1");                     // inherits group priority
});

Inline vs returned group

// Inline (returns IServiceCollection)
builder.Services.MapTickerGroup("Billing", group => { ... });

// Returned (for external configuration)
var billing = builder.Services.MapTickerGroup("Billing");
billing.MapTicker<ChargeJob>();
billing.MapTicker<RefundJob>();

On this page