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

Monthly and yearly cron errors #28

Closed
the-darc opened this issue Oct 21, 2014 · 2 comments
Closed

Monthly and yearly cron errors #28

the-darc opened this issue Oct 21, 2014 · 2 comments
Assignees
Labels

Comments

@the-darc
Copy link

I found this issue in the released version 0.4.4.

For the code:

parser.parseExpression('0 0 0 1 1 *', function(err, interval) {
  var count = 5;
  while (count) {
    try {
        console.log(interval.next());
        count--;
    } catch (e) {
        break;
    }
  }
});

I got the output:

Wed Oct 22 2014 00:00:00 GMT+0300 (EEST)
Thu Oct 23 2014 00:00:00 GMT+0300 (EEST)
Fri Oct 24 2014 00:00:00 GMT+0300 (EEST)
Sat Oct 25 2014 00:00:00 GMT+0300 (EEST)
Sun Oct 26 2014 00:00:00 GMT+0300 (EEST)

If i run the same code in the version 0.4.3 it works fine:

Thu Oct 01 2015 00:00:00 GMT+0300 (EEST)
Sat Oct 01 2016 00:00:00 GMT+0300 (EEST)
Sun Oct 01 2017 00:00:00 GMT+0300 (EEST)
Mon Oct 01 2018 00:00:00 GMT+0300 (EEST)
Tue Oct 01 2019 00:00:00 GMT+0300 (EEST)

The same problem seems to happen with the expression '0 0 0 1 * *'.

@harrisiirak harrisiirak self-assigned this Oct 21, 2014
@harrisiirak
Copy link
Owner

Thanks for a report! Found the issue and published new version. Let me know if it's still an issue.

@the-darc
Copy link
Author

Issue solved, thanks!

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

No branches or pull requests

2 participants