https://github.com/spring-projects/spring-framework/blob/b595dc1dfad9db534ca7b9e8f46bb9926b88ab5a/spring-context/src/main/java/org/springframework/scheduling/support/CronExpression.java#L226

If CronExpression is 0 0 0 1 * * and temporal is 2021-06-01T00:00, then the result will be 2021-07-01, although 2021-06-01 also fits this expression. But in other cases, if in the expression 0 0 0 1 * * 1 replace with another value from 2 to 31, then the expected result is obtained

Comment From: poutsma

I'm not completely sure I understand the question.

CronExpression::next provides the next temporal that matches the pattern. This can never be the same temporal that gets passed to the method.

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.