use proper schedule for cron

This commit is contained in:
shoopea
2023-08-01 01:22:59 +02:00
parent 54a16bd410
commit 8ecde237b1
2 changed files with 7 additions and 5 deletions

View File

@@ -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.