Skip to content
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

Provide alternatives to scheduling with node-cron #9654

Closed
1 task done
LucCADORET opened this issue May 24, 2022 · 2 comments
Closed
1 task done

Provide alternatives to scheduling with node-cron #9654

LucCADORET opened this issue May 24, 2022 · 2 comments
Labels
needs triage This issue has not been looked into type: enhancement 🐺

Comments

@LucCADORET
Copy link

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

The node-cron package has a bug that has been going for 6 years: kelektiv/node-cron#232
As a consequence of this bug, some scheduled task stop running without any error message, and thus is incredibly hard to debug
We experienced multiple times at our company in production, forcing us to restart the backend, but this is not an ideal workaround.

Describe the solution you'd like

I would like to have an implementation of different schedulers like https://github.com/node-schedule/node-schedule#readme or others, to provide an alternative to node-cron.

Teachability, documentation, adoption, migration strategy

Just like for the websockets, it would be nice to have multiple adapters that you pick at the start of the program, e.g.:
app.useSchedulingAdapter(new NodeCronAdapter(app));

What is the motivation / use case for changing the behavior?

In production, some scheduled functions will stop running without any error message or log. It produces unpredictible errors, and as a result, the nestjs scheduling functionality is not usable in production.

@LucCADORET LucCADORET added needs triage This issue has not been looked into type: enhancement 🐺 labels May 24, 2022
@LucCADORET LucCADORET changed the title Add alternatives to scheduling with node-cron Provide alternatives to scheduling with node-cron May 24, 2022
@LucCADORET
Copy link
Author

node-schedule seems to have a similar kind of issue node-schedule/node-schedule#494
node-schedule/node-schedule#614

@kamilmysliwiec
Copy link
Member

There's an alternative already nestjs/schedule#312 (comment)

@nestjs nestjs locked and limited conversation to collaborators May 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs triage This issue has not been looked into type: enhancement 🐺
Projects
None yet
Development

No branches or pull requests

2 participants