mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修改定时规则类型
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user