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-10 10:13:27 +00:00
|
|
|
c.AddFunc("0 * * * * *", readFacebookPage)
|
2018-09-11 16:29:38 +00:00
|
|
|
c.AddFunc("*/20 * * * * *", getStreamStatus)
|
2018-09-09 15:36:56 +00:00
|
|
|
c.Start()
|
|
|
|
}
|