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