From 8ecde237b12d3b7fca60add077f69fd8406bae56 Mon Sep 17 00:00:00 2001 From: shoopea Date: Tue, 1 Aug 2023 01:22:59 +0200 Subject: [PATCH] use proper schedule for cron --- admin.go | 4 +++- version.go | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/admin.go b/admin.go index 5848258..278c4b3 100644 --- a/admin.go +++ b/admin.go @@ -86,7 +86,9 @@ func (a *AdminConfig) Run() { }() c := cron.New(cron.WithLocation(time.UTC)) - c.AddFunc("00 * * *", func() { cfg.Run() }) + if _, err := c.AddFunc("0 0 * * *", func() { cfg.Run() }); err != nil { + log.WithFields(log.Fields{"call": "cron.AddFunc", "error": err}).Errorf("") + } c.Start() // Listen for the interrupt signal. diff --git a/version.go b/version.go index da82a5c..a4c7b7d 100644 --- a/version.go +++ b/version.go @@ -1,7 +1,7 @@ // Code generated by version.sh (@generated) DO NOT EDIT. package main -var githash = "c72f903" +var githash = "54a16bd" var branch = "v2" -var buildstamp = "2023-07-31_22:15:30" -var commits = "77" -var version = "c72f903-b77 - 2023-07-31_22:15:30" +var buildstamp = "2023-07-31_23:22:29" +var commits = "78" +var version = "54a16bd-b78 - 2023-07-31_23:22:29"