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.15k stars 262 forks source link

Support random time intervals #608

Open a1kaigorodov opened 1 year ago

a1kaigorodov commented 1 year ago

On OpenBSD, you can use the ~ symbol to specify random time intervals. You can find more information about this in the crontab(5) manual.

It would be great if the library could parse these cron expressions and translate them into an ordinal cron expressions with a given Random instance.

jmrozanec commented 1 year ago

@a1kaigorodov thanks! This will be a great addition.

mawinter69 commented 6 months ago

that would really be great if that could be implemented. A requirement would be that I can give some hash value to the isMatch, nextExecution and lastExecution as input so that the random is reproducible.