fix: rename cron phrases to be mare accurate
This commit is contained in:
@@ -8,7 +8,7 @@ export function parseCron(cron: string | null): {
|
||||
let value: RegExpMatchArray | null;
|
||||
if (cron === null) {
|
||||
return {
|
||||
type: CronType.ONE_TIME,
|
||||
type: CronType.MANUAL,
|
||||
value: 0,
|
||||
};
|
||||
} else if ((value = /^0 (\d+) \* \* \*$/i.exec(cron)) !== null) {
|
||||
@@ -33,7 +33,7 @@ export function parseCron(cron: string | null): {
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
type: CronType.SPECIFIC,
|
||||
type: CronType.CUSTOM,
|
||||
value: 0,
|
||||
};
|
||||
}
|
||||
@@ -53,7 +53,7 @@ export function getCron(
|
||||
return `0 0 ${value.toFixed(0)} * *`;
|
||||
case CronType.EVERY_YEAR:
|
||||
return `0 0 1 ${value.toFixed(0)} *`;
|
||||
case CronType.SPECIFIC:
|
||||
case CronType.CUSTOM:
|
||||
if (validCron(fallback)) {
|
||||
return fallback;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user