升级 cron-parser

This commit is contained in:
whyour
2025-11-11 00:36:32 +08:00
parent 1f2fd8ac02
commit 1deb264913
8 changed files with 33 additions and 21 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import { Joi } from 'celebrate';
import cron_parser from 'cron-parser';
import { CronExpressionParser } from 'cron-parser';
import { ScheduleType } from '../interface/schedule';
import path from 'path';
import config from '../config';
@@ -13,7 +13,7 @@ const validateSchedule = (value: string, helpers: any) => {
}
try {
if (cron_parser.parseExpression(value).hasNext()) {
if (CronExpressionParser.parse(value).hasNext()) {
return value;
}
} catch (e) {