Click or drag to resize
RecurringJobScheduler Class
Represents a background process responsible for enqueueing recurring jobs.
Inheritance Hierarchy
SystemObject
  Hangfire.ServerRecurringJobScheduler

Namespace: Hangfire.Server
Assembly: Hangfire.Core (in Hangfire.Core.dll) Version: 1.5.0.0
Syntax
public class RecurringJobScheduler : IBackgroundProcess

The RecurringJobScheduler type exposes the following members.

Constructors
  NameDescription
Public methodRecurringJobScheduler
Initializes a new instance of the RecurringJobScheduler class with default background job factory.
Public methodRecurringJobScheduler(IBackgroundJobFactory)
Initializes a new instance of the RecurringJobScheduler class with custom background job factory.
Top
Methods
Remarks

This background process polls the recurring job schedule for recurring jobs ready to be enqueued. Interval between scheduler polls is hard-coded to 1 minute as a compromise between frequency and additional stress on job storage.

Tip Tip
Use custom background processes if you need to schedule recurring jobs with frequency less than one minute. Please see the IBackgroundProcess interface for details.

Recurring job schedule is based on Set and Hash data structures of a job storage, so you can use this background process as an example of a custom extension.

Multiple instances of this background process can be used in separate threads/processes without additional configuration (distributed locks are used). However, this only adds support for fail-over, and does not increase the performance.

Important note Important
If you are using custom filter providers, you need to pass a custom IBackgroundJobFactory instance to make this process respect your filters when enqueueing background jobs.
Thread Safety
Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
See Also