New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cronjobs getting called multiple times #445
Comments
Let's track this here kelektiv/node-cron#489 (comment) |
FYI: I found that adding a
=>
The order of the log entries makes it a bit confusing, but if you look at the time stamps you can see it calls |
For me adding a |
Also it seems to be that if this is an underlying issue in https://github.com/kelektiv/node-cron then this won't be fixed quite soon since the project isn't really maintained anymore. See here kelektiv/node-cron#578 |
@maxpeterson Thanks a lot man, it seemed silly at first but I did add a name and it solved the issue and it's running just once now. Thanks a lot I've been stuck with this from last couple of hours. |
@maxpeterson Yes, thanks a lot. It worked for me too :) |
@kamilmysliwiec then the bug is still present in @nestjs/schedule, isn't it? |
Yes still i am able to reproduce it over server and giving name to cron job didn't solve issue for me |
Hi! I'm one of |
I'm submitting a...
Current behavior
I am using NestJs and trying to use the schedule module for cronjobs. One of the methods is decorated with @Cron('*/30 * * * * * ') and I expected it to run only once after 30 seconds. The issue is after every 30 seconds, the cron runs three times. This is a consistent behavior and happens all the time. However I have observed that other methods which are also cronjobs are working as expected(run only once). Have been trying to figure out the root cause but there is no luck so far.
Expected behavior
The cronjobs should always only run only once.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
The current implementation for me results in sending multiple events to webengage which in turn sends multiple notifications to the users.
Environment
The text was updated successfully, but these errors were encountered: