Table of Contents

Interface ISchedulerRepository

Namespace
Quartz.Extensibility
Assembly
Quartz.dll

Holds references to Scheduler instances - ensuring uniqueness, and preventing garbage collection, and allowing 'global' lookups.

public interface ISchedulerRepository

Remarks

Schedulers are indexed by name. Multiple schedulers with the same name but different instance IDs can coexist (e.g., remote proxies to different cluster nodes). Pass an instance ID to Lookup(string, string?) to disambiguate between them.

Methods

Bind(IScheduler, string?)

Binds a scheduler to the registry.

void Bind(IScheduler scheduler, string? instanceId = null)

Parameters

scheduler IScheduler

The scheduler to bind.

instanceId string

The instance ID to index the scheduler under. When null, SchedulerInstanceId supplies it; pass it explicitly for a remote scheduler, where reading that property may cost a network call.

Lookup(string, string?)

Looks up a scheduler by name, and by instance ID when one is given.

IScheduler? Lookup(string schedulerName, string? instanceId = null)

Parameters

schedulerName string

The name of the scheduler to look up.

instanceId string

The instance ID to disambiguate by. When null, the first scheduler registered under the name is returned.

Returns

IScheduler

LookupAll()

Returns all registered schedulers.

List<IScheduler> LookupAll()

Returns

List<IScheduler>

LookupByName(string)

Returns all schedulers with the given name.

List<IScheduler> LookupByName(string schedulerName)

Parameters

schedulerName string

Returns

List<IScheduler>

Remove(string, string?)

Removes a scheduler from the registry.

bool Remove(string schedulerName, string? instanceId = null)

Parameters

schedulerName string

The name of the scheduler to remove.

instanceId string

The instance ID of the scheduler to remove. When null, the first scheduler registered under the name is removed.

Returns

bool

true if a scheduler was found and removed.