Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

325
Views
CRON is running twice in Node js

In nodejs I have scheduled a CRON that is running every day at 10 AM to send the push notification. Now the issue is, every time when this CRON is triggering 2 notifications are being sent to the user's device. Here is my code

var job2 = new CronJob('00 00 10 * * *', (res) => { woStatusCheck(); }, null, true, 'Asia/Kolkata'); job2.start();

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can check their documentation. 4th parameter of the constructor is named start and by sending true for it, it will run the job before exiting the constructor. Then calling your job.start() runs it again. You either send false at 4th parameter and use the .start() or remove the .start() and send true

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!