Skip to content

CronSequenceGenerator fails to accurately compute earliest next date when using second expression [SPR-9459] #14094

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

Closed
spring-projects-issues opened this issue Jun 1, 2012 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jun 1, 2012

sebdotv opened SPR-9459 and commented

If using an expression containing seconds like "*/15 * 1-4 * * *", CronSequenceGenerator will compute the following next dates:

  • from 01-june-2012 9:53:50 -> the next day at 1:00:00, which is correct
  • from 01-june-2012 9:53:00 -> the next day at 1:00:15, which is not the earliest possible schedule (above)

Corresponding test case attached.


Affects: 3.1.1

Attachments:

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

I've refined CronSequenceGenerator's rounding up of seconds to address such second-specific cron expressions now, while retaining the desirable rounding-up behavior needed by other cases. To be released in 3.2.2.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants