PaymentCenter/app/console/kernel.go

22 lines
463 B
Go

package console
import (
"PaymentCenter/config"
"fmt"
"github.com/robfig/cron"
)
/**
* 配置执行计划
* @wiki https://godoc.org/github.com/robfig/cron
*/
func RegisterSchedule(c *cron.Cron) {
fmt.Println(config.GetConf().CronConfig)
//c.AddFunc("0 30 * * * *", test)
//c.AddFunc("@hourly", test)
//c.AddFunc("@every 10s", test)
c.AddFunc("@every 60s", closeOrder)
c.AddFunc("@every 10s", queryOrder)
c.AddFunc("@every 60s", queryRefundOrder)
}