Method ScheduleAsync
- Namespace
- Millrace
- Assembly
- Millrace.dll
ScheduleAsync<T>(Expression<Func<T, Task>>, TimeSpan, EnqueueOptions?, CancellationToken)
Runs after delay.
public ValueTask<JobId> ScheduleAsync<T>(Expression<Func<T, Task>> call, TimeSpan delay, EnqueueOptions? options = null, CancellationToken ct = default) where T : class
Parameters
callExpression<Func<T, Task>>delayTimeSpanoptionsEnqueueOptionsctCancellationToken
Returns
Type Parameters
T
Exceptions
- ArgumentOutOfRangeException
delayis negative. A past due time is expressed with the DateTimeOffset overload, where it is unambiguous; a negative delay is far more likely to be a subtraction that went the wrong way.
ScheduleAsync<T>(Expression<Func<T, Task>>, DateTimeOffset, EnqueueOptions?, CancellationToken)
Runs at at (UTC).
public ValueTask<JobId> ScheduleAsync<T>(Expression<Func<T, Task>> call, DateTimeOffset at, EnqueueOptions? options = null, CancellationToken ct = default) where T : class
Parameters
callExpression<Func<T, Task>>atDateTimeOffsetoptionsEnqueueOptionsctCancellationToken
Returns
Type Parameters
T