Overview
The JobScheduler class is used for managing repeatable jobs. It allows you to create, update, and remove job schedulers that automatically create jobs at specified intervals.Constructor
The name of the queue
Configuration options
The JobScheduler is typically accessed through the
Queue.jobScheduler property rather than instantiated directly.Example
Methods
upsertJobScheduler
Creates or updates a job scheduler.Unique identifier for the job scheduler
Repeat configuration options
Name for jobs created by this scheduler
Data for jobs created by this scheduler
Job options template
Whether to override existing scheduler
Optional producer identifier
getScheduler
Retrieves a job scheduler by ID.The job scheduler ID
The job scheduler data or undefined if not found
getJobSchedulers
Gets all job schedulers.Offset of first scheduler to return
Offset of last scheduler to return
Return in ascending order by next execution time
getSchedulersCount
Gets the number of job schedulers.removeJobScheduler
Removes a job scheduler.The identifier of the job scheduler to remove
Number of removed schedulers (0 or 1)
