Start
pulse.start()
pulse.start()
Example Usage
const pulse = new Pulse();
pulse.processEvery(100);
pulse.start(); // It should be in this position See NOTES section at the page
pulse.every('1 day', 'dailyReport', { reportId: 123 });
Returns
Promise<void | unknown>
: A promise that resolves when the database has been set up beforehand and the job processing begins. If the job queue has already been started, the promise resolves with the previously set ready state.
Notes
Pre-requisite:
start
must be called after config method(e.g.processEvery)
is set and ideally before scheduling any jobs with methods likeevery
orschedule
.Idempotence: If
start
is called multiple times, subsequent calls will recognize that processing has already been initiated and will not create additional intervals.
Last updated
Was this helpful?