Commit 0b2147a4 by huangchengyi

1.0

parent 4e7f8080
Showing with 6 additions and 4 deletions
......@@ -26,10 +26,12 @@ func main() {
ZyCronService := service.ZyCronService{}
ZyCronService.ZyDiscount(goods_id)
//定时任务,每隔3天统计一次
err := gocron.Every(3).Day().At("1:20").Do(ZyDiscount,goods_id)
<- gocron.Start()
fmt.Print("启动任务状态",err)
if goods_id != "" {
//定时任务,每隔3天统计一次
err := gocron.Every(3).Day().At("1:20").Do(ZyDiscount,goods_id)
<- gocron.Start()
fmt.Print("启动任务状态",err)
}
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment