Enable
pulse.enable(query)
pulse.enable(query)
The enable
method reverses the effects of the disable
method by updating job records in the MongoDB database to clear the disabled
flag, allowing them to be processed again by the job scheduler. This is useful for resuming job execution after a temporary pause.
Example Usage
Parameters
query
(Filter<unknown>
- optional): A MongoDB filter query to select the jobs to be enabled. If no query is provided, it defaults to an empty object{}
, potentially enabling all jobs if not used with caution.
Returns
Promise<number>
: A promise that resolves with the number of job records that were modified to an enabled state. This count provides an indication of how many jobs were affected by the operation.
Last updated