Table of Contents

Interface IScheduledJob

Namespace
Integrations.Application.Jobs
Assembly
Integrations.Application.dll

A recurring background job. Runs on one replica at a time (distributed lock on Name).

public interface IScheduledJob

Properties

Interval

Time between runs.

TimeSpan Interval { get; }

Property Value

TimeSpan

Name

Unique job name, used in logs, metrics and the advisory lock.

string Name { get; }

Property Value

string

RunAt

Wall-clock time (business time zone) for jobs that should run once a day at a set time, e.g. reconciliation at 03:00. Null (the default) means "every Interval".

TimeOnly? RunAt { get; }

Property Value

TimeOnly?

Methods

RunAsync(CancellationToken)

Runs once. Only one replica runs a job at a time.

Task RunAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task