Francesco Torchia 118aaf16b7
Latest changes from Harvester master - a537c1ae38eb7030542ac371f24ae3336cd9d422
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-10-23 17:01:40 +02:00

12 lines
196 B
JavaScript

import cronstrue from 'cronstrue';
export function isCronValid(schedule = '') {
try {
const hint = cronstrue.toString(schedule);
return !!hint;
} catch (e) {
return false;
}
}