Table of Contents

Method UpsertRecurringAsync

Namespace
Millrace
Assembly
Millrace.dll

UpsertRecurringAsync<T>(string, string, Expression<Func<T, Task>>, EnqueueOptions?, CancellationToken)

Creates or updates a cron definition (five-field vixie syntax, UTC). The recurring id is the definition's identity; IdempotencyKey is not supported here in 0.1 and throws.

public ValueTask UpsertRecurringAsync<T>(string recurringId, string cron, Expression<Func<T, Task>> call, EnqueueOptions? options = null, CancellationToken ct = default) where T : class

Parameters

recurringId string
cron string
call Expression<Func<T, Task>>
options EnqueueOptions
ct CancellationToken

Returns

ValueTask

Type Parameters

T

Exceptions

ArgumentException

recurringId is empty; or options carries an IdempotencyKey, which the recurring id already serves as; or cron parses but never fires. The last is checked here rather than left to the scheduler, because a definition that can never produce an occurrence is silent at exactly the moment its author is watching for the first run.