node-cron / node-cron

A simple cron-like job scheduler for Node.js
ISC License
2.97k stars 253 forks source link

CRON job is executing twice #299

Open Skylux-Telelink opened 3 years ago

Skylux-Telelink commented 3 years ago

I found cron job is executing twice in my code. can any one help in this issue?

adamsmarshmello commented 3 years ago

maybe you need to optimize your code

mjafartp commented 3 years ago

This is because you may have more than 1 node process. in most live environments have more than 1 process.

strubloid commented 2 years ago

@Skylux-Telelink This is happening with me, as each time that I publish the new version I need to delete my previous one, maybe you have a previous scheduler in it?

I am fixing this by loading the PID on a terminal level, I kill it with kill and i try to run again.

hemalhansda commented 2 years ago

I am also having the same issue. In my case, it is not happening because of a previous scheduler in it.

waheedsd commented 1 year ago

I'm also facing same Issue, when ever a new patch get updates node-cron runs multiple times. Is this because old cron instance not getting killed ?

Please help us

dushmanta05 commented 4 months ago

Facing the same issue using sailsjs