job runs multiple times every minute with reschedule
See original GitHub issueconst schedule = require('node-schedule');
const cron = '*/1 * * * *';
const job = new schedule.Job('test', function () {
console.info('job ' + job.name + ' running at ' + new Date().toLocaleString());
job.reschedule(cron);
});
job.schedule(cron);
job runs hundred times with this code. job.reschedule()
function fires the job runs wrongly.
but if changed the code const cron = '*/15 * * * * *';
, it’s just runs once, jos.rescheduled()
functoin works fine.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
node.js - Agenda Job: now() make the job running multiple times
The above works as expected i.e. it runs the job every 5 minutes. But I don't want a recurring job. Rather run it...
Read more >How to run a scheduled job every 1 minute , and automatically ...
It is not possible. Scheduled classes are queued, and sometimes they can take longer than a minute to run. This means that your...
Read more >Schedule job multiple times within time range - TechDocs
Use REXX to schedule a job to run multiple times within a set time range. ... Within the application, a UNIX job needs...
Read more >Change Default Pipeline Schedule Worker interval to look for ...
From now on, my scheduled jobs can run every 15 minutes, which seems to me like a good tradeoff compared to every minute...
Read more >Cron Job: A Comprehensive Guide for Beginners 2023
Cron jobs can't be distributed to multiple computers on a network. ... If a task fails, it won't run again until the next...
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
@mariohmol it runs every second in this case, change
to
I found out my issue: https://github.com/node-schedule/node-schedule/issues/263#issuecomment-406616377
thanks