【Bug】schedule.scheduleJob executed twice
See original GitHub issueAWS Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-116-generic x86_64) node: v8.11.1 node-schedule: 1.2.4
my code:
// Everyday 0:00, generater new tasks
const rule = new schedule.RecurrenceRule();
rule.hour = 0;
rule.minute = 0;
rule.second = 0;
schedule.scheduleJob(rule, () => {
console.log('Recurrence job start');
getTaskRules();
});
my log:
Previous log is ok too!
server no restart, no error:
I have encountered this problem a few months ago, I just restarted the server, it works fine! but now,it is coming again!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:19 (4 by maintainers)
Top Results From Across the Web
Sometime execute scheduled job twice, - bug?
A scheduled background job is to execute twice. Not sure why this is happening. Schedule Job Code -> var res = BackgroundJob.
Read more >Data Services Schedules are getting executed twice at run time
Issue: Data Services Schedules are getting executed twice at run time. How to reproduce the issue: 1) Create a Job Schedule from DS...
Read more >Node schedule runs task too many times - Stack Overflow
To build that, I used the node-schedule package. I specified it that every day at 16:00 it should execute a function: schedule.scheduleJob("* * ......
Read more >How to schedule a job twice a day with different minutes?
To schedule two jobs, use two scheduling statements: System.schedule('4AM RUN', '0 0 4 ? * *', new AccessScheduler()); System.schedule('4AM ...
Read more >Scheduled task runs twice, bug in task scheduler - TechNet
Now I've encountered a very strange problem which I believe is a bug. Sometimes the task will be run twice. This is clearly...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you used PM2, because PM2 is used to start two processes。
I update to 1.3.0 and it had worked fine for a few months.