mtfosbot/module/background/background.go

18 lines
330 B
Go
Raw Normal View History

2018-09-09 15:36:56 +00:00
package background
2018-09-10 10:13:27 +00:00
import (
"github.com/robfig/cron"
)
2018-09-09 15:36:56 +00:00
var c *cron.Cron
// SetBackground -
func SetBackground() {
c = cron.New()
2018-09-21 10:36:09 +00:00
// c.AddFunc("0 * * * * *", readFacebookPage)
2018-09-11 16:29:38 +00:00
c.AddFunc("*/20 * * * * *", getStreamStatus)
2018-09-12 10:07:49 +00:00
c.AddFunc("*/5 * * * * *", checkOpay)
2018-09-17 06:30:49 +00:00
c.AddFunc("0 0 */3 * * *", checkYoutubeSubscribe)
2018-09-09 15:36:56 +00:00
c.Start()
}