jmrozanec / cron-utils

Cron utils for parsing, validations and human readable descriptions as well as date/time interoperability.
http://cron-utils.com
Apache License 2.0
1.14k stars 262 forks source link

how to compute the number of executions between two days? #622

Open kasuohei opened 5 months ago

kasuohei commented 5 months ago

README is say, this sdk provide the function: Compute the number of executions between two days by cron Expression, how? I want to get the number of execution in yesterday by cron expression, for example: (1) 0 50 0 ? yesterday should be execute one time

(2) 0 26,29,33 * ? yesterday should be execute three times

(3) 0 0 23 L * ? yesterday should be execute zero time

plus: just for example, need to consider different case

MasseGuillaume commented 4 months ago

https://javadoc.io/static/com.cronutils/cron-utils/9.2.1/com/cronutils/model/time/ExecutionTime.html#countExecutions-java.time.ZonedDateTime-java.time.ZonedDateTime-