update
This commit is contained in:
parent
3734239446
commit
fdb36c7bcd
6
cron.go
6
cron.go
@ -1,18 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
//"github.com/robfig/cron/v3"
|
||||
"gopkg.in/robfig/cron.v3"
|
||||
)
|
||||
|
||||
func startCron() *Cron {
|
||||
func startCron() *cron.Cron {
|
||||
c := cron.New(cron.WithLocation(time.UTC))
|
||||
c.AddFunc("@every 1m", cronSendReport)
|
||||
c.Start()
|
||||
return
|
||||
}
|
||||
|
||||
func stopCron(c *Cron) {
|
||||
func stopCron(c *cron.Cron) {
|
||||
c.Stop()
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user