mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修复任务列表下次运行时间展示
This commit is contained in:
parent
a1501705c1
commit
026640a757
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user