Thanks to everyone who contributed to this amazing library.
This is my first pull request to an open source project, and I'm ready to learn, open to any comments :)
I had trouble with this library running cron expressions like */3,1,1-12 * * * * or 1-30/2,31-59/5 * * * *.
I found that, according to the assertions in the unit tests, this project regards cron expressions as invalid when multiple ranges and step are mixed. However, those expressions pass many online validators, and also seem valid to me.
I switched the handling order of / and , characters in \Cron\AbstractField::validate() method to meet the semantic order of cron expression, and the library now works as expected.
After the code change, existing unit tests that invalidate such expressions now fail.
Thanks to everyone who contributed to this amazing library. This is my first pull request to an open source project, and I'm ready to learn, open to any comments :)
I had trouble with this library running cron expressions like
*/3,1,1-12 * * * *
or1-30/2,31-59/5 * * * *
. I found that, according to the assertions in the unit tests, this project regards cron expressions as invalid when multiple ranges and step are mixed. However, those expressions pass many online validators, and also seem valid to me.I switched the handling order of
/
and,
characters in\Cron\AbstractField::validate()
method to meet the semantic order of cron expression, and the library now works as expected.After the code change, existing unit tests that invalidate such expressions now fail.
*/3,1,1-12
*/3,1,1-12
*/10,2,1-12
If these invalidations are by intention, my fix would be an incorrect one. Thanks again for this great library. Regards