cron-parser
cron-parser copied to clipboard
Possible bug: 0 12 1-31 * 1 is parsed incorrectly
Hi,
the expression 0 12 1-31 * 1
should output dates that match every day-of-month and day-of-week since both fields are not *
, but it outputs the same as 0 12 * * 1
, which should only match the day-of-week, since day-of-month is *
.
The output is:
- Mon, Sep 12, 2022, 14:00
- Mon, Sep 19, 2022, 14:00
- Mon, Sep 26, 2022, 14:00
- Mon, Oct 03, 2022, 14:00
- Mon, Oct 10, 2022, 14:00
- Mon, Oct 17, 2022, 14:00
On the other hand an expression like 0 12 1 * 0-6
triggers every day, while the expression 0 12 1 * *
triggers only on the first day-of-month. I think this behaviour is the correct one and I am asking why the behaviour is asynchronous between day-of-week and day-of-month being either *
or 1-31
, 0-6
.