Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

326
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda