package services import ( "eta/eta_data_analysis/utils" "fmt" "github.com/beego/beego/v2/task" ) func Task() { fmt.Println("task start") if utils.YongyiOpen == "1" { handleYongyiExcelDaily := task.NewTask("handleYongyiExcelDaily", "0 35 13,23 * * *", HandleYongyiExcelDaily) task.AddTask("涌益咨询日度指标处理", handleYongyiExcelDaily) handleYongyiExcelWeekly := task.NewTask("handleYongyiExcelWeekly", "0 5 17,23 * * *", HandleYongyiExcelWeekly) task.AddTask("涌益咨询周度指标处理", handleYongyiExcelWeekly) //HandleYongyiExcelDaily("/Users/xiexiaoyuan/Downloads/2023年11月21日涌益咨询日度数据 (1).xlsx") //HandleYongyiExcelWeekly() yongyiDownloadDaily := task.NewTask("YongyiDownloadDaily", "0 30 13,23 * * *", YongyiDownloadDaily) task.AddTask("涌益咨询日度指标下载", yongyiDownloadDaily) yongyiDownloadWeekly := task.NewTask("YongyiDownloadWeekly", "0 0 17,23 * * *", YongyiDownloadWeeyly) task.AddTask("涌益咨询周度指标下载", yongyiDownloadWeekly) task.StartTask() } fmt.Println("task end") }