From 1bab4371e6b6a208c8b8125bcf4b60aa45ea09bc Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 11 Oct 2023 20:38:09 +0800 Subject: [PATCH] fix --- services/cron/cron.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/cron/cron.go b/services/cron/cron.go index 63db75ab3b335..3c5737e3718ff 100644 --- a/services/cron/cron.go +++ b/services/cron/cron.go @@ -107,12 +107,11 @@ func ListTasks() TaskTable { prev = e.PreviousRun() } + task.lock.Lock() // If the manual run is after the cron run, use that instead. if prev.Before(task.LastRun) { prev = task.LastRun } - - task.lock.Lock() tTable = append(tTable, &TaskTableRow{ Name: task.Name, Spec: spec,