adhocore / gronx

Lightweight, fast and dependency-free Cron expression parser (due checker, next/prev due date finder), task runner, job scheduler and/or daemon for Golang (tested on v1.13+) and standalone usage. If you are bold, use it to replace crontab entirely.
https://github.com/adhocore/gronx
MIT License
422 stars 25 forks source link

`boundsByPos` & `valueByPos` needs to start checking from seconds instead of minutes #17

Closed sananguliyev closed 1 year ago

sananguliyev commented 1 year ago

https://github.com/adhocore/gronx/blob/main/checker.go#L112 checks minutes in the first position. It should start from seconds and year should be on 7th position.

The same change should be applied here, too: https://github.com/adhocore/gronx/blob/main/checker.go#L93

adhocore commented 1 year ago

thanks, wip (but almost ready) in #19 if you would like to try out preview somehow. (and seems like BC break is not that big of a concern how it preserves current behavior)

btw if you are interested i appreciate a contrib to make tasker run with time.NewTicker() instead of userland hack.