I Find this validation can not support "L" OR "W",How can do if we need these chat?
rondsjinhuajin opened this issue · 2 comments
rondsjinhuajin commented
GuillaumeRochat commented
@rondsjinhuajin sorry for the late reply, I never received any notification.
I would use the following library which supports more feature : https://github.com/Airfooox/cron-validate
The preset aws-cloud-watch
supports those, but not the seconds. I think it's identical to the quartz rules otherwise.
cron('0 12 L * ? *', {
preset: 'aws-cloud-watch',
})
GuillaumeRochat commented
Ah, even better, you can override their config if needed:
cronValidate('0 0 12 L * ?', {
preset: 'aws-cloud-watch',
override: {
useSeconds: true,
useYears: false,
}
}).isValid();