Open liuyuquan150 opened 3 weeks ago
looks to be be duplicate of #605
@austek, isn't this expected behavior? We are trying to parse a Quartz cron expression using a Spring parser. Since 6#3 represents the 3rd Friday in Quartz and the 3rd Saturday in Spring, it seems like this is just a misunderstanding. The next execution time should infact be 20th July 2024 (3rd Saturday of the month). Or am I missing something?
@msajawalsial you're right, this is the expected behaviour, https://spring.io/blog/2020/11/10/new-in-spring-5-3-improved-cron-expressions#second-friday-of-the-month
Bug: Incorrect next execution date calculation for "0 15 10 ? * 6#3"
Description
I encountered a bug in cron-utils version 9.2.0 when calculating the next execution date for the cron expression "0 15 10 ? * 6#3" using
CronType.SPRING53
. The expected result should be July 19th, 2024, but the method returns July 20th, 2024.Steps to Reproduce
Use the following code to parse the cron expression and calculate the next execution time:
Run the code. The expected result should be the third Friday of the current month (July 2024), which is July 19th, 2024, at 10:15 AM local time.
Actual Result
The method returns July 20th, 2024, instead of July 19th, 2024.
Environment Information
Expected Result
The next execution date for the cron expression "0 15 10 ? * 6#3" should be July 19th, 2024, at 10:15 AM local time.
Additional Information
Below is the output of the code: