mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
12 lines
196 B
JavaScript
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;
|
|
}
|
|
}
|