Cron runs multiple times based on number of vCPUs
ashin-kk opened this issue · comments
Hi, I find a problem while using node-cron.
The cron function is called multiple times based on the number of CPUs the server is running on.
For example - if the server has 4 cores - the function is called 4 times. If there are 2 cores it will be called 2 times.
When running in a local environment, it works perfectly as only one CPU is running at a time.
Please guide how to resolve this issue. We depend heavily on corn jobs.
Regards,
Ashin
I also had this problem but I decoupled the cron jobs into a single cpu worker. This way there are no replications
@0xayot
Thanks for the response. Can you please guide me how to achieve this?
Regards,
Ashin