mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 20:54:03 +08:00
15 lines
212 B
Go
15 lines
212 B
Go
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()
|
|
}
|