Hello 👋,
I noticed that some cron strings generated by this package are not valid according to Quartz’s cron validation rules.
For example, if you generate a cron like:
0/60 * * ? * * *
Quartz rejects it with the error:
Increment > 60 : 60
This happens because in Quartz, the valid ranges are:
- Seconds: 1–59
- Minutes: 1–59
- Hours: 1–23
Therefore, increments (*/N or 0/N) must never exceed the maximum value of that field. In this case, 0/60 is invalid, and the highest possible value should be 0/59.
How to reproduce
- Go to https://freeformatter.com/cron-expression-generator-quartz.html (which uses this plugin).
- Generate a cron with an increment of
60.
- Copy/paste the generated cron expression in the input field next to the "Describe expression" button
- Use the "Describe expression" button.
➡️ You’ll see Quartz fail with the error:
Increment > 60 : 60
Suggested fixes
Fix in cron-core
path: @sbzen/cron-core/ui/utils/get-list.js
- Adjust the logic so that when
every = true and the context is Quartz cron, the generated list goes from 1 to 59 instead of 1 to 60. Same with the 1 to 24 range.
Thank you for your consideration.