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

Class SchedulerService

Inheritance
System.Object
SchedulerService
Implements
System.IDisposable
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: 9.12.2
Syntax
[ServiceConfiguration(Lifecycle = ServiceInstanceScope.Singleton, ServiceType = typeof(ISchedulerService))]
public class SchedulerService : ISchedulerService, IDisposable

Constructors

SchedulerService()

Declaration
[Obsolete("Use alternative constructor")]
public SchedulerService()

SchedulerService(IScheduledJobRepository, IScheduledJobStatusService)

Declaration
public SchedulerService(IScheduledJobRepository repo, IScheduledJobStatusService status)
Parameters
Type Name Description
IScheduledJobRepository repo
IScheduledJobStatusService status

SchedulerService(ScheduledJobRepository)

Declaration
[Obsolete("Use alternative constructor")]
public SchedulerService(ScheduledJobRepository repo)
Parameters
Type Name Description
ScheduledJobRepository repo

SchedulerService(WaitableTimer, Int32, IScheduledJobRepository, IScheduledJobStatusService)

Declaration
protected SchedulerService(WaitableTimer waitableTimer, int refreshInterval, IScheduledJobRepository repo, IScheduledJobStatusService status)
Parameters
Type Name Description
WaitableTimer waitableTimer
System.Int32 refreshInterval
IScheduledJobRepository repo
IScheduledJobStatusService status

SchedulerService(WaitableTimer, Int32, ScheduledJobRepository)

Declaration
[Obsolete("Use alternative constructor")]
protected SchedulerService(WaitableTimer waitableTimer, int refreshInterval, ScheduledJobRepository repo)
Parameters
Type Name Description
WaitableTimer waitableTimer
System.Int32 refreshInterval
ScheduledJobRepository repo

Properties

CurrentScheduledItem

Current scheduler job

Declaration
protected virtual ScheduledItem CurrentScheduledItem { get; set; }
Property Value
Type Description
ScheduledItem

WaitOnException

Amount of time to wait if the scheduler can not execute the job

Declaration
protected virtual TimeSpan WaitOnException { get; set; }
Property Value
Type Description
System.TimeSpan

Methods

ClearScheduledItem()

Clear the current job

Declaration
protected virtual void ClearScheduledItem()

Dispose()

Declaration
public void Dispose()

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

Execute()

Execute the job

Declaration
protected virtual void Execute()

ExecuteJob()

Execute the job

Declaration
protected virtual void ExecuteJob()

Initialize(InitializationEngine)

Declaration
[Obsolete("Method is no longer supported, use Start/Stop via ISchedulerService to managed the service", true)]
public void Initialize(InitializationEngine context)
Parameters
Type Name Description
InitializationEngine context

LoadNextScheduledItem()

load the next job from DB

Declaration
protected virtual ScheduledItem LoadNextScheduledItem()
Returns
Type Description
ScheduledItem

The next job

Run()

Run the Jobs

Declaration
public virtual void Run()

Stop()

Stop the jobs

Declaration
public virtual void Stop()

Uninitialize(InitializationEngine)

Declaration
[Obsolete("Method is no longer supported, use Start/Stop via ISchedulerService to managed the service", true)]
public void Uninitialize(InitializationEngine context)
Parameters
Type Name Description
InitializationEngine context

Implements

System.IDisposable

Extension Methods