package cron

import (
	"bwallet/service/red_packet_service"
	"github.com/robfig/cron"
)

var c *cron.Cron

func Setup() {
	c = cron.New()

	//c.AddFunc("* * * * * *", func() {
	//	coin_gas_service.TokenView()
	//})

	c.AddFunc("* * * * * *", func() {
		red_packet_service.UpdateReceive()
	})

	c.AddFunc("* * * * * *", func() {
		red_packet_service.UpdateInfo()
	})

	c.Start()
}
