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
recurringIdstringcronstringcallExpression<Func<T, Task>>optionsEnqueueOptionsctCancellationToken
Returns
Type Parameters
T
Exceptions
- ArgumentException
recurringIdis empty; oroptionscarries an IdempotencyKey, which the recurring id already serves as; orcronparses 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.