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

Class ScheduledJobExecutorExtensions

Extention methods for the IScheduledJobExecutor service.

Inheritance
System.Object
ScheduledJobExecutorExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Scheduler
Assembly: EPiServer.dll
Version: 10.10.4
Syntax
public static class ScheduledJobExecutorExtensions

Methods

ListRunningJobs<T>(IScheduledJobExecutor)

List all jobs of the provided type that the IScheduledJobExecutor are currently executing.

Declaration
public static IEnumerable<T> ListRunningJobs<T>(this IScheduledJobExecutor executor)
    where T : ScheduledJobBase
Parameters
Type Name Description
IScheduledJobExecutor executor

The executor that should be used.

Returns
Type Description
System.Collections.Generic.IEnumerable<T>

A list of the currently running jobs.

Type Parameters
Name Description
T

The type of job that should be returned

Remarks

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

StartAsync(IScheduledJobExecutor, ScheduledJob)

Starts an instance of a job using the default options.

Declaration
public static Task<JobExecutionResult> StartAsync(this IScheduledJobExecutor executor, ScheduledJob job)
Parameters
Type Name Description
IScheduledJobExecutor executor

The executor that should be used.

ScheduledJob job

The job that should be executed.

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

StartAsync(IScheduledJobExecutor, ScheduledJob, JobExecutionOptions)

Starts an instance of a job using the provided options.

Declaration
public static Task<JobExecutionResult> StartAsync(this IScheduledJobExecutor executor, ScheduledJob job, JobExecutionOptions options)
Parameters
Type Name Description
IScheduledJobExecutor executor

The executor that should be used.

ScheduledJob job

The job that should be executed.

JobExecutionOptions options

Options for executing the job

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