-
Notifications
You must be signed in to change notification settings - Fork 80
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
build(schedule): replace dependency cron with croner #1165
base: master
Are you sure you want to change the base?
Conversation
360d1d3
to
a08752a
Compare
35dd905
to
db453ca
Compare
Made some changes to both Croner and the PR, should be ready for review now. If you're interested of course 🤓 |
6697a02
to
e90c70f
Compare
e90c70f
to
cd23c7f
Compare
|
Regarding #1296 , overrun protection is already supported by croner |
Hi @kamilmysliwiec @Hexagon, what is the status of this PR? The current situation with |
@AbdlrahmanSaberAbdo, this PR is still good to go on my end. I've released a few patches of Croner since this PR, but it is just to update the version number after merging. |
Adding a comparison of various alternatives since the release of
Croner is fastest, has most features, and have been stable with current feature set for quite a while. codespace@codespaces-00f3ec:/workspaces/cron-comparison main [!]> npm run test
Tests performed at 2023-10-09T19:35:28.895Z Tested libraries (npm trends):
Pattern
|
Library | OK | FAIL | % OK |
---|---|---|---|
cron | 7 | 4 | 64% |
croner | 11 | 0 | 100% |
cronosjs | 10 | 1 | 91% |
node-cron | 0 | 11 | 0% |
node-schedule | 9 | 2 | 81% |
cd23c7f
to
8490047
Compare
PR updated to |
Edit: I was targeting the wrong node-cron... sorry for the noise. |
Hi, I would love to know what kind of critical bug you're encountering with As a note, the only bugs remaining (except the very recent DST one) occur extremely rarely, and we aren't able to replicate them despite our efforts and constant use of the library. Moreover, the users reporting the bug become silent when we ask them to provide debugging information or reproduction means. So if you're having one of these issues, please let us know! |
Hello @sheerlox! I was checking the issues there : https://github.com/node-cron/node-cron/issues, and did not realize it was not the right repository... We have been having memory issues since we started using nestjs/schedule, and found this issue. We thought we had found the culprit, but apparently it is not the case. We will try to create a minimal reproduction repository (but it is commercial code, you know how it goes). I'll remove my comment above. |
How about supporting multiple backends ? |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #1164
What is the new behavior?
This PR replaces dependency
cron
withcroner
.Croner
Changes and new features brought by this PR
5#L
is last friday of current month.legacyMode:
Which adds support for using an alternative way of combining the day of the week and day of the month - to be able to find, for example, Friday the 13th. More information on this feature is available in croner issue #53.Does this PR introduce a breaking change?
string | number
tonumber
.previousRun()
,.nextRun()
and.nextRuns()
return native JavaScript Date objects instead of moment-objects.cron
andcroner
differ in exported members. Documentation need to be updatedL: L can be used in the day of the month field to specify the last day of the month. It can also be used in the day of the week field to specify the last specific weekday of the month, for example, the last Friday (`5#L`).
Other information