MCPcopy Create free account
hub / github.com/node-schedule/node-schedule / cancelJob

Function cancelJob

lib/schedule.js:63–74  ·  view source on GitHub ↗
(job)

Source from the content-addressed store, hash-verified

61}
62
63function cancelJob(job) {
64 let success = false;
65 if (job instanceof Job) {
66 success = job.cancel();
67 } else if (typeof job == 'string' || job instanceof String) {
68 if (job in scheduledJobs && Object.prototype.hasOwnProperty.call(scheduledJobs, job)) {
69 success = scheduledJobs[job].cancel();
70 }
71 }
72
73 return success;
74}
75
76function gracefulShutdown() {
77 const jobs = Object.keys(scheduledJobs).map(key => scheduledJobs[key]);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…