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

fix: cron month starts from 0 #1063

Merged
merged 1 commit into from Feb 3, 2023
Merged

Conversation

bangbang93
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

cron package count month from 0

So 0 0 1 1 * will run at February 1st, not January 1st.

cron.time('0 0 1 1 *').sendAt().toJSDate()
2023-01-31T16:00:00.000Z

Issue Number: N/A

What is the new behavior?

cron.time('0 0 1 0 *').sendAt().toJSDate()
2022-12-31T16:00:00.000Z

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

https://github.com/kelektiv/node-cron#cron-ranges

Copy link
Member

@micalevisk micalevisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants