Validates CRON pattern (Quartz) and supports groups. Useful for e.g. typescript or other typed languages.
The following greoups are covered:
A group generally consists of START_{GROUP}
, DELIMITER_{GROUP}
and END_{GROUP}
containing the first character of the group, the used delimiter (generally ,
,-
,/
) and the last character.
If a group has a delimiter (typeof DELIMITER_{GROUP} !== "undefined") you can split a complete group into an array by using the groups delimiter on the group string. Example
const cronregex = cronstring.match(regex); //this regex string
const regexgroups = cronregex.groups as RegexGroups; //custom stype
const secondsarray = regexgroups.SECOND.split(regexgroups.DELIMITER_SEC); //every character as array item
More information: https://docs.openinc.dev/docs/opendash-core/overview