Class ScheduledJobExecutorExtensions
Extention methods for the IScheduledJobExecutor service.
Inheritance
System.Object
    ScheduledJobExecutorExtensions
  Namespace: EPiServer.Scheduler
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public static class ScheduledJobExecutorExtensions : ObjectMethods
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 : ScheduledJobBaseParameters
| 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> | 
