Skip to content

ILocalDurableJobManager Methods

Provides functionality for scheduling and managing jobs on the local silo.

CancelAsync(DurableJob, CancellationToken)

abstract
public abstract Task<bool> CancelAsync(DurableJob job, CancellationToken requestCancellationToken)
Requests cancellation of a previously scheduled durable job.

Parameters

jobDurableJob
The durable job for which cancellation is requested.
requestCancellationTokenCancellationToken
A token which cancels this request operation. It does not cancel a job execution attempt.

Returns

A System.Threading.Tasks.Task representing the asynchronous operation. The result is true when the cancellation request was durably recorded, preventing future attempts; otherwise, false. An already-running attempt is cooperatively independent of this request and may still complete.

Exceptions

System.ArgumentNullException
job is null.

ScheduleJobAsync(ScheduleJobRequest, CancellationToken)

abstract
public abstract Task<DurableJob> ScheduleJobAsync(ScheduleJobRequest request, CancellationToken cancellationToken)
Schedules a job to be executed at a specific time on the target grain.

Parameters

requestScheduleJobRequest
The request containing the job scheduling parameters.
cancellationTokenCancellationToken
A cancellation token to cancel the operation.

Returns

A System.Threading.Tasks.Task representing the asynchronous operation that returns the durable job.

Exceptions

System.ArgumentException
ScheduleJobRequest is null, empty, or whitespace.