fix: rename cron phrases to be mare accurate

This commit is contained in:
2026-07-19 14:49:19 +02:00
parent 5032906d91
commit dd7f0b5df7
5 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -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;
}