I'm working on a Java project and need to calculate the number of matches of a jakarta.ejb.ScheduleExpression within a specific time interval. I've already written an implementation that generates the ScheduleExpression from an JSON-Resultset. However, now I need to calculate the number of matches the Cron Schedule would match in a time interval.
Here is an Example of the JSON Object:
{
"dayOfWeek": "Mon,Wed",
"hour": "15",
"month": null,
"dayOfMonth": "*",
"year": null,
"second": 0/5,
"minute": "00"
}
Could anyone provide guidance or suggest a more efficient approach to achieve this? Any help or suggestions would be greatly appreciated.
Thank you.