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

18 lines
329 B
Go

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