question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

schedule.scheduledJobs

See original GitHub issue

The scheduledJobs member of node-schedule is not mentioned in the documentation and also has a problem if two schedules with identical titles are added:


var schedule = require('node-schedule');

var rule = new schedule.RecurrenceRule();
rule.second = 10;

var j1 = schedule.scheduleJob("sched1", rule, function() { console.log("hi there 1"); });
var j2 = schedule.scheduleJob("sched1", rule, function() { console.log("hi there 2"); });

schedule.scheduledJobs['sched1'].cancel()  // j1 will continue to be invoked, but can't be accessed for cancelation

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:2
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
amnondcommented, Dec 7, 2016

ok, thanks. Will try to help.

0reactions
deskohcommented, May 30, 2019

Another issue is that job scheduled to run only once (i,e, Date-based Scheduling) is never removed from scheduledJobs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to delete all schedules in node-schedule? - Stack Overflow
but I would like code to get all scheduled jobs and then loop through them to delete each one. I think the following...
Read more >
How to use the node-schedule.scheduledJobs function in ...
To help you get started, we've selected a few node-schedule.scheduledJobs examples, based on popular ways it is used in public projects.
Read more >
node-schedule - npm
Node Schedule is a flexible cron-like and not-cron-like job scheduler for Node.js. It allows you to schedule jobs (arbitrary functions) for ...
Read more >
Register-ScheduledJob (PSScheduledJob) - PowerShell
The Register-ScheduledJob cmdlet creates scheduled jobs on the local computer. A scheduled job is a Windows PowerShell background job that can be started ......
Read more >
Scheduled jobs - Product Documentation | ServiceNow
Scheduled Jobs are automated pieces of work that can be performed at a specific time or on a recurring schedule.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found