mtfosbot/module/background/background.go
2018-09-12 00:29:38 +08:00

16 lines
237 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.Start()
}