From c5d47a67aadff9d081f483a66c202750bf54fde8 Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Fri, 24 Sep 2021 00:11:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=88=97=E8=A1=A8=E4=B8=8B=E6=AC=A1=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/task.sh | 2 +- src/pages/crontab/index.tsx | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/shell/task.sh b/shell/task.sh index 00c4e4c8..415a0f58 100755 --- a/shell/task.sh +++ b/shell/task.sh @@ -274,7 +274,7 @@ main() { run_concurrent "$1" "$3" ;; desi) - run_single "$1" "$3" "$4" + run_designated "$1" "$3" "$4" ;; *) run_else "$@" diff --git a/src/pages/crontab/index.tsx b/src/pages/crontab/index.tsx index cad12aaf..649f93d1 100644 --- a/src/pages/crontab/index.tsx +++ b/src/pages/crontab/index.tsx @@ -641,6 +641,10 @@ const Crontab = ({ headerStyle, isPhone }: any) => { const handleCrons = (cron: any) => { const index = value.findIndex((x) => x._id === cron._id); const result = [...value]; + cron.nextRunTime = cron_parser + .parseExpression(cron.schedule) + .next() + .toDate(); if (index === -1) { result.unshift(cron); } else { @@ -657,6 +661,10 @@ const Crontab = ({ headerStyle, isPhone }: any) => { .then((data: any) => { const index = value.findIndex((x) => x._id === cron._id); const result = [...value]; + data.data.nextRunTime = cron_parser + .parseExpression(data.data.schedule) + .next() + .toDate(); result.splice(index, 1, { ...cron, ...data.data,