MCPcopy Index your code
hub / github.com/node-schedule/node-schedule / cancelInvocation

Function cancelInvocation

lib/Invocation.js:302–317  ·  view source on GitHub ↗
(invocation)

Source from the content-addressed store, hash-verified

300}
301
302function cancelInvocation(invocation) {
303 const idx = invocations.indexOf(invocation);
304 if (idx > -1) {
305 invocations.splice(idx, 1);
306 if (invocation.timerID !== null) {
307 lt.clearTimeout(invocation.timerID);
308 }
309
310 if (currentInvocation === invocation) {
311 currentInvocation = null;
312 }
313
314 invocation.job.emit('canceled', invocation.fireDate);
315 prepareNextInvocation();
316 }
317}
318
319/* Recurrence scheduler */
320function scheduleNextRecurrence(rule, job, prevDate, endDate) {

Callers 1

JobFunction · 0.85

Calls 1

prepareNextInvocationFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…