November Happy Hour will be moved to Thursday December 5th.

Interface IScheduledJobExecutor

Service responsible for executing scheduled jobs.

Namespace: EPiServer.Scheduler
Assembly: EPiServer.dll
Version: 10.10.4
Syntax
public interface IScheduledJobExecutor

Methods

Cancel(Guid)

Cancel any running job with the provided identifier

Declaration
void Cancel(Guid id)
Parameters
Type Name Description
System.Guid id

The ScheduledJob identifier.

ListRunningJobs()

List all jobs that the IScheduledJobExecutor are currently executing.

Declaration
IEnumerable ListRunningJobs()
Returns
Type Description
System.Collections.IEnumerable

A list of the currently running jobs.

Remarks

This method will not return jobs that are running in other contexts such as another server.

StartAsync(ScheduledJob, JobExecutionOptions, CancellationToken)

Starts an instance of a job using the provided options.

Declaration
Task<JobExecutionResult> StartAsync(ScheduledJob job, JobExecutionOptions options, CancellationToken cancellationToken)
Parameters
Type Name Description
ScheduledJob job

The job that should be executed.

JobExecutionOptions options

Options for executing the job

System.Threading.CancellationToken cancellationToken

Cancellation token that can be used for cancel the task that runs the job

Returns
Type Description
System.Threading.Tasks.Task<JobExecutionResult>

A JobExecutionResult instance containing information on the resulting status.

Extension Methods