mtfosbot/module/background/background.go
2018-09-21 18:36:09 +08:00

18 lines
330 B
Go

package background
import (
"github.com/robfig/cron"
)
var c *cron.Cron
// SetBackground -
func SetBackground() {
c = cron.New()
// c.AddFunc("0 * * * * *", readFacebookPage)
c.AddFunc("*/20 * * * * *", getStreamStatus)
c.AddFunc("*/5 * * * * *", checkOpay)
c.AddFunc("0 0 */3 * * *", checkYoutubeSubscribe)
c.Start()
}