The JobManager is a module for managing reoccurring intervals, also called jobs.
For example, the updater registers a job by default to handle the update check, which runs every 6 hours.
Jobs are registered at runtime by calling registerJob(job: Job), where job is an object which includes metadata and the function to execute.
This feature is also available to Plugins, as documented on the Creating Plugins page.
The job manager should be used whenever possible to reduce points of failure.
Do not register intervals yourself, let this do it for you.
Please use your browser's search function Ctrl+F to find something specific on this page.
Kind: global class
- JobManager
- new JobManager(controller)
- .controller :
Controller - .jobs :
Array.<Job> - .registerJob(job) ⇒
Error|null - .unregisterJob(name) ⇒
Error|null
Constructor - The jobManager handles running and managing interval based functions (jobs), like update checks, cleanups, etc.
| Param | Type | Description |
|---|---|---|
| controller | Controller |
Reference to the controller object |
jobManager.controller : Controller
Reference to the controller object
Kind: instance property of JobManager
jobManager.jobs : Array.<Job>
Collection of all registered jobs
Kind: instance property of JobManager
Registers a job
Kind: instance method of JobManager
Returns: Error | null - Returns null on success or err on failure, specifying the reason why.
| Param | Type | Description |
|---|---|---|
| job | Job |
Object of the job to register |
Unregisters a job
Kind: instance method of JobManager
Returns: Error | null - Returns null on success or err on failure, specifying the reason why.
| Param | Type | Description |
|---|---|---|
| name | string |
Name of the job to unregister |