diff --git a/src/utils/index.ts b/src/utils/index.ts index 09bc2f5a..9d6a35ca 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,6 +1,7 @@ import intl from 'react-intl-universal'; import { LANG_MAP, LOG_END_SYMBOL } from './const'; import cron_parser from 'cron-parser'; +import { ICrontab } from '@/pages/crontab/type'; export default function browserType() { // 权重:系统 + 系统版本 > 平台 > 内核 + 载体 + 内核版本 + 载体版本 > 外壳 + 外壳版本 @@ -343,12 +344,12 @@ export function parseCrontab(schedule: string): Date | null { export function getCrontabsNextDate( schedule: string, - extra_schedules: string[], + extra_schedules: ICrontab['extra_schedules'], ): Date | null { let date = parseCrontab(schedule); if (extra_schedules?.length) { extra_schedules.forEach((x) => { - const _date = parseCrontab(x); + const _date = parseCrontab(x.schedule); if (_date && (!date || _date < date)) { date = _date; }