feat: support kick
This commit is contained in:
16
utils/cron.go
Normal file
16
utils/cron.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/go-co-op/gocron"
|
||||
)
|
||||
|
||||
var (
|
||||
s = gocron.NewScheduler(time.UTC)
|
||||
)
|
||||
|
||||
func CronStart(f func()) {
|
||||
s.Every("1m").Do(f)
|
||||
s.StartAsync()
|
||||
}
|
||||
Reference in New Issue
Block a user