From b081d3d4693c71da38bad4a16fd3fda8c3e3eb42 Mon Sep 17 00:00:00 2001 From: tbxark Date: Tue, 17 Sep 2024 01:16:13 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E6=94=B9cron=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 78e1645..47bef04 100644 --- a/main.go +++ b/main.go @@ -143,7 +143,6 @@ func main() { log.Fatalf("load config error: %s", err.Error()) } - runBackupTask(conf) if conf.Cron != "" { task := cron.New() _, e := task.AddFunc(conf.Cron, func() { @@ -153,5 +152,7 @@ func main() { log.Fatalf("add cron task error: %s", e.Error()) } task.Run() + } else { + runBackupTask(conf) } }