dragonmantank / cron-expression

CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
MIT License
4.57k stars 124 forks source link

expression like "0 8,20 ? * ?" parse failed #137

Closed imdgr886 closed 1 year ago

imdgr886 commented 2 years ago

but CronExpression::isValidExpression("0 8,20 ? * ?") is return true

dragonmantank commented 1 year ago

This is indeed a bug, the issue is the two parts don't reference each other so it doesn't throw an error. It should though an invalid expression error though.

dragonmantank commented 1 year ago

This should be fixed in the latest release (v3.3.3), let me know if you are still having problems.