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

Interface IScheduledJobStatusService

Status service that interacts with the scheduler executing the jubs

Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[Obsolete("This interface has been retired. Some methods can be accessed using IScheduledJobLogRepository. Others are performed directly by IScheduledJobExecutor/ISchedulerService.")]
public interface IScheduledJobStatusService

Methods

GetExecutionLog(Guid)

List log information for the ScheduledJob.

Declaration
[Obsolete("Use EPiServer.Scheduler.IScheduledJobLogRepository.GetAsync instead")]
IEnumerable<ScheduledJobLogItem> GetExecutionLog(Guid id)
Parameters
Type Name Description
System.Guid id
Returns
Type Description
System.Collections.Generic.IEnumerable<ScheduledJobLogItem>
Remarks

Method returns a maximum of 100 log items

GetNextScheduledJob()

Get the next job up for execution

Declaration
[Obsolete("This method is no longer called by the Scheduler and will be removed in a future release")]
ScheduledJob GetNextScheduledJob()
Returns
Type Description
ScheduledJob

A ScheduledJob instance if there is a waiting job, otherwise null.

MarkAsFailed(Guid)

Mark the scheduled job as failed to prevent it from being executed. This flag is only temporary and execution will start again when the application has been restarted.

Declaration
[Obsolete("This method is no longer used by the Scheduler and will be removed in a future release")]
void MarkAsFailed(Guid id)
Parameters
Type Name Description
System.Guid id

The job identifier

ReportExecutedJob(Guid, ScheduledJobLogItem)

Report a job as executed with status information of outcome

Declaration
[Obsolete("Use EPiServer.Scheduler.IScheduledJobLogRepository.LogAsync instead")]
void ReportExecutedJob(Guid id, ScheduledJobLogItem status)
Parameters
Type Name Description
System.Guid id

Job id

ScheduledJobLogItem status

If the job executed successfully

TryMarkForExecution(Guid, DateTime, TimeSpan)

Marks a job for execution to prevent others to run job scheduled for a specific time

Declaration
[Obsolete("This method is no longer called by the Scheduler and will be removed in a future release")]
bool TryMarkForExecution(Guid id, DateTime scheduledAt, TimeSpan pingTimeout)
Parameters
Type Name Description
System.Guid id

The identity

System.DateTime scheduledAt

The expected execution time, will be validated to make sure no one else have takes the job

System.TimeSpan pingTimeout

Expect UpdateRunningState(Guid, Boolean) to be called for running jobs withing the timeout specified

Returns
Type Description
System.Boolean

True if the job was successfully marked for execution

Remarks

When the ping timeout has expired and no calls to update running state have been made future jobs will no longer be blocked

UpdateCurrentStatusMessage(Guid, String)

Update current status message for a running job

Declaration
[Obsolete("This method is no longer called by the Scheduler and will be removed in a future release")]
void UpdateCurrentStatusMessage(Guid id, string message)
Parameters
Type Name Description
System.Guid id

The job id

System.String message

Status message

UpdateRunningState(Guid, Boolean)

Update running state

Declaration
[Obsolete("This method is no longer called by the Scheduler and will be removed in a future release")]
void UpdateRunningState(Guid id, bool isRunning)
Parameters
Type Name Description
System.Guid id

Job id

System.Boolean isRunning

If job is running or not

Extension Methods