mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-13 04:02:56 +08:00
定时任务支持 @once 和 @boot 任务
This commit is contained in:
@@ -263,7 +263,9 @@ const Crontab = () => {
|
||||
},
|
||||
},
|
||||
render: (text, record) => {
|
||||
return dayjs(record.nextRunTime).format('YYYY-MM-DD HH:mm:ss');
|
||||
return record.nextRunTime
|
||||
? dayjs(record.nextRunTime).format('YYYY-MM-DD HH:mm:ss')
|
||||
: '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -396,9 +398,13 @@ const Crontab = () => {
|
||||
|
||||
setValue(
|
||||
data.map((x) => {
|
||||
const specialSchedules = ['@once', '@boot'];
|
||||
const nextRunTime = specialSchedules.includes(x.schedule)
|
||||
? null
|
||||
: getCrontabsNextDate(x.schedule, x.extra_schedules);
|
||||
return {
|
||||
...x,
|
||||
nextRunTime: getCrontabsNextDate(x.schedule, x.extra_schedules),
|
||||
nextRunTime,
|
||||
subscription: subscriptionMap?.[x.sub_id],
|
||||
};
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user