Skip to main content

Class: SchedulerRegistry

A registry for managing scheduled jobs.

Constructors​

Constructor​

new SchedulerRegistry(): SchedulerRegistry

Returns​

SchedulerRegistry

Methods​

existsJob()​

existsJob(name): boolean

Checks if a job exists in the scheduler.

Parameters​

name​

string

The name of the job to check.

Returns​

boolean

True if the job exists, false otherwise.


getAllJobs()​

getAllJobs(type?): JobDefinition[]

Gets all jobs from the scheduler.

Parameters​

type?​

JobType

The type of jobs to get.

Returns​

JobDefinition[]

An array of jobs.


getJob()​

getJob(name): JobDefinition | undefined

Gets a job from the scheduler.

Parameters​

name​

string

The name of the job to get.

Returns​

JobDefinition | undefined

The job, or undefined if not found.


registerJob()​

registerJob(job): void

Registers a job with the scheduler.

Parameters​

job​

JobDefinition

The job to register.

Returns​

void


removeJob()​

removeJob(name): void

Removes a job from the scheduler.

Parameters​

name​

string | JobDefinition

The name of the job to remove.

Returns​

void