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 := 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() c.Start()
// Listen for the interrupt signal. // Listen for the interrupt signal.

View File

@ -1,7 +1,7 @@
// Code generated by version.sh (@generated) DO NOT EDIT. // Code generated by version.sh (@generated) DO NOT EDIT.
package main package main
var githash = "c72f903" var githash = "54a16bd"
var branch = "v2" var branch = "v2"
var buildstamp = "2023-07-31_22:15:30" var buildstamp = "2023-07-31_23:22:29"
var commits = "77" var commits = "78"
var version = "c72f903-b77 - 2023-07-31_22:15:30" var version = "54a16bd-b78 - 2023-07-31_23:22:29"