cron-parser icon indicating copy to clipboard operation
cron-parser copied to clipboard

Should validate repeat string baisc format

Open zangguodong opened this issue 2 years ago • 1 comments

https://github.com/harrisiirak/cron-parser/blob/f687555f25ff0e4e12a951f3a4827b382436692f/lib/expression.js#L275

Due to not providing basic repeat atomic format validation, cron-parser sees format like 10 16/17/18 * * * as valid, and parse it as 10 16/17 * * *. But 16/17/18 should not be correct format, isn't it?

image

zangguodong avatar Mar 28 '22 03:03 zangguodong

@zangguodong thanks for reporting this! It should throw an error indeed as it's in an invalid format.

harrisiirak avatar Mar 29 '22 07:03 harrisiirak