修改定时规则类型

This commit is contained in:
whyour
2025-02-21 01:35:08 +08:00
parent 8173075b67
commit fa83761d27
7 changed files with 116 additions and 87 deletions
+5 -1
View File
@@ -1,8 +1,12 @@
import { Joi } from 'celebrate';
import cron_parser from 'cron-parser';
import { ScheduleType } from '../interface/schedule';
const validateSchedule = (value: string, helpers: any) => {
if (value.startsWith('@once') || value.startsWith('@boot')) {
if (
value.startsWith(ScheduleType.ONCE) ||
value.startsWith(ScheduleType.BOOT)
) {
return value;
}