MichaelXavier / cron

Cron data structure and parser for Haskell
Other
53 stars 33 forks source link

please add method to calculate the next time when a crontab is expected to match #7

Closed thkoch2001 closed 8 years ago

thkoch2001 commented 10 years ago

I'd like to build a tool that checks, whether all my crontabs did run as expected. For this I need to know, when a crontab is actually expected to run after a given timestamp.

jkarni commented 9 years ago

I'd also like this, and #9 doesn't seem to help with my use case (telling an external cache when to expire a key, based on crontab-like config syntax).

MichaelXavier commented 8 years ago

Resurrecting this thread from the dead: we actually ended up needing this at my work so I got the time to solve this problem. I've actually got this implemented and tested in the misleadingly named gadt branch. I would say don't bring in this code as a dependency quite yet as I have some cleanup and module rearrangement to do, but this is close to getting solved. This branch involves breaking type changes so the version update will reflect that, but if your code is just parsing cron strings and checking matches/running a scheduler, you may not need to change anything on your end.

MichaelXavier commented 8 years ago

Released as 0.4.0.