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()
|
||
|
}
|