From 303cfb84cb36c51075e04c3b600e8cf192fdf70c Mon Sep 17 00:00:00 2001 From: Gabriel Herbert Date: Wed, 6 Oct 2021 21:41:39 +0200 Subject: [PATCH] Update check on first start in case important security updates are available --- scheduler/scheduler.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scheduler/scheduler.go b/scheduler/scheduler.go index 0d6ea02f..9b4f6445 100644 --- a/scheduler/scheduler.go +++ b/scheduler/scheduler.go @@ -93,8 +93,9 @@ func Start() error { // system tasks currently have a single schedule, every x seconds s.intervalType = "seconds" - if s.runLastUnix == 0 { - // system task schedule never ran, use now as starting point + // system task schedule never ran, use now as starting point + // update check should however run immediately (in case of important security update) + if s.runLastUnix == 0 && t.name != "updateCheck" { s.runLastUnix = tools.GetTimeUnix() }