SaaS CMS has officially launched! Learn more now.

Class SchedulerDB

Inheritance
System.Object
SchedulerDB
Namespace: EPiServer.DataAccess.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
[ServiceConfiguration]
public class SchedulerDB : Object

Constructors

SchedulerDB(ServiceAccessor<IAsyncDatabaseExecutor>)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public SchedulerDB(ServiceAccessor<IAsyncDatabaseExecutor> databaseHandler)
Parameters
Type Name Description
ServiceAccessor<IAsyncDatabaseExecutor> databaseHandler

Fields

DefaultMaxLogItems

Default maximum number of log items per job to store in the database: 1000

Declaration
public const int DefaultMaxLogItems = 1000
Field Value
Type Description
System.Int32

Properties

MaxLogItems

Get or sets the maximum number of log items per job to store in the database. Default is DefaultMaxLogItems.

Declaration
public static int MaxLogItems { get; set; }
Property Value
Type Description
System.Int32

Methods

AddJobLogAsync(Guid, ScheduledJobLogItem)

Declaration
public virtual Task AddJobLogAsync(Guid id, ScheduledJobLogItem item)
Parameters
Type Name Description
System.Guid id
ScheduledJobLogItem item
Returns
Type Description
System.Threading.Tasks.Task

GetJobLogAsync(Guid, Int64, Int32)

Declaration
public virtual Task<PagedScheduledJobLogResult> GetJobLogAsync(Guid id, long startIndex, int maxCount)
Parameters
Type Name Description
System.Guid id
System.Int64 startIndex
System.Int32 maxCount
Returns
Type Description
System.Threading.Tasks.Task<PagedScheduledJobLogResult>

List()

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public virtual IEnumerable<ScheduledJob> List()
Returns
Type Description
System.Collections.Generic.IEnumerable<ScheduledJob>

ListLog(Guid)

Declaration
public DataSet ListLog(Guid id)
Parameters
Type Name Description
System.Guid id
Returns
Type Description
System.Data.DataSet

Remove(Guid)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public virtual void Remove(Guid id)
Parameters
Type Name Description
System.Guid id

Save(ScheduledJob)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public virtual void Save(ScheduledJob job)
Parameters
Type Name Description
ScheduledJob job

TruncateJobLogAsync(Guid)

Declaration
public virtual Task TruncateJobLogAsync(Guid id)
Parameters
Type Name Description
System.Guid id
Returns
Type Description
System.Threading.Tasks.Task

UpdateCurrentStatusMessage(Guid, String)

Update the current status message on the job This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public virtual void UpdateCurrentStatusMessage(Guid id, string statusMessage)
Parameters
Type Name Description
System.Guid id

Id of the Job

System.String statusMessage

Message

UpdateExecutionState(Guid, DateTime, Nullable<DateTime>, Int32, Int32, Int32)

Declaration
public virtual bool UpdateExecutionState(Guid id, DateTime currentExecutionDate, Nullable<DateTime> updatedExecutionDate, int pingSeconds, int expectedExecutionAttempt, int nextExecutionAttempt)
Parameters
Type Name Description
System.Guid id
System.DateTime currentExecutionDate
System.Nullable<System.DateTime> updatedExecutionDate
System.Int32 pingSeconds
System.Int32 expectedExecutionAttempt
System.Int32 nextExecutionAttempt
Returns
Type Description
System.Boolean

UpdateRunningState(Guid, Boolean, Boolean)

Update the running state for a specific job This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public virtual void UpdateRunningState(Guid id, bool isRunning, bool resetLastExecutionAttempt)
Parameters
Type Name Description
System.Guid id

Job

System.Boolean isRunning

State

System.Boolean resetLastExecutionAttempt

Reset the LastExecutionAttempt

Extension Methods