Share via


ScheduledJob Class

Definition

Provides a base class for scheduled jobs to be executed as part of the service.

public abstract class ScheduledJob : IDisposable, Microsoft.WindowsAzure.Mobile.Service.ScheduledJobs.IScheduledJob
type ScheduledJob = class
    interface IScheduledJob
    interface IDisposable
Public MustInherit Class ScheduledJob
Implements IDisposable, IScheduledJob
Inheritance
ScheduledJob
Implements

Constructors

ScheduledJob()

Creates a new instance of the ScheduledJob class.

Properties

CancellationToken

Gets a CancellationToken indicating whether the scheduled job has been cancelled. Scheduled jobs that run for an extended amount of time should listen to this token to see if they are being cancelled.

Services

Gets or sets the ApiServices associated with this ScheduledJob.

Methods

Dispose()

Releases the unmanaged resources and disposes of the managed resources used by this ScheduledJob instance. When the job completes this method is called automatically by the infrastructure.

Dispose(Boolean)

Releases the unmanaged resources used by this ScheduledJob instance and optionally disposes of the managed resources. Override this method to dispose additional resources specific to this particular ScheduledJob implementation.

ExecuteAsync()

When implemented in a derived class, executes the scheduled job asynchronously. Implementations that want to know whether the scheduled job is being cancelled can get a CancellationToken from the CancellationToken property.

ExecuteAsync(ScheduledJobDescriptor, CancellationToken)

Executes the scheduled job provided a scheduledJobDescriptor and an cancellationToken.

Initialize(ScheduledJobDescriptor, CancellationToken)

Initializes this ScheduledJob before execution begins.

Applies to