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

fix: 0 is forbidden for day #32

Closed millotp closed 1 year ago

millotp commented 1 year ago

According to the cron specification, the allowed values for the day segment must be between 1-31, but currently the cron * * 0 * * is allowed.

This PR aims at making IsValid("* * 0 * *") return false.

codecov-commenter commented 1 year ago

Codecov Report

Merging #32 (8aee396) into main (5a6b134) will not change coverage. Report is 2 commits behind head on main. The diff coverage is 100.00%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

@@           Coverage Diff           @@
##             main      #32   +/-   ##
=======================================
  Coverage   94.78%   94.78%           
=======================================
  Files           9        9           
  Lines         594      594           
=======================================
  Hits          563      563           
  Misses         16       16           
  Partials       15       15           
Files Changed Coverage Δ
checker.go 100.00% <100.00%> (ø)
validator.go 100.00% <100.00%> (ø)
adhocore commented 1 year ago

thank you very much for your PR. i will check next day, is that okay?

millotp commented 1 year ago

Hey, no problem thanks for the response

adhocore commented 1 year ago

merged/released https://github.com/adhocore/gronx/releases/tag/v1.6.6 thanks