Closed peterbe closed 4 months ago
It's the 24
in hour field of 20 */24 * * *
that made the cron string invalid. Strictly speaking, the hour should be in range [0, 23].
Testing on https://crontab.guru, 20 */24 * * *
can be replaced with valid 20 0 * * *
.
BTW, the cron validation is done in https://github.com/actions/languageservices, file workflow-parser/src/model/converter/cron.ts
. Looks like it's stricter than the validators used by https://crontab.guru and GitHub Action.
You're right. It does say "Hour [0, 23]" in the spec. So the strictness is just a minor differences. Seems GitHub Actions is a bit more forgiving in this corner case.
I changed it on our end to your recommendation and now the validator is not showing any warnings or errors.
Describe the bug
It says that
20 */24 * * *
is not a valid cron schedule. (see screenshot below)To Reproduce Steps to reproduce the behavior:
Expected behavior
That it doesn't say it's invalid.
Screenshots
Extension Version Don't know how to look that up. But I think it's the latest because it automatically upgrades itself.
Additional context
I know the schedule works by looking at our Actions runs.
I used https://crontab.guru/#20_*/24_*_*_* to see if it works there.