dockerfiles/anylink/server/cron/start.go

15 lines
212 B
Go
Raw Normal View History

2022-11-10 15:53:48 +08:00
package cron
import (
"time"
"github.com/go-co-op/gocron"
)
func Start() {
s := gocron.NewScheduler(time.Local)
s.Cron("0 * * * *").Do(ClearAudit)
s.Cron("0 * * * *").Do(ClearStatsInfo)
s.StartAsync()
}