Răsfoiți Sursa

测试环境打开

lichangdong 1 zi în urmă
părinte
comite
0db7d535ed
1 a modificat fișierele cu 29 adăugiri și 29 ștergeri
  1. 29 29
      crontask/init.go

+ 29 - 29
crontask/init.go

@@ -25,35 +25,35 @@ func NewCronTask(ctx context.Context, svcCtx *svc.ServiceContext) *CronTask {
 func ScheduleRun(c *cron.Cron, serverCtx *svc.ServiceContext) {
 
 	//除了fe环境任务关闭 其他环境任务要正常打开
-	//l := NewCronTask(context.Background(), serverCtx)
-	//c.AddFunc("* * * * *", func() {
-	//	l.sendMsg()
-	//})
-	//
-	//sendWx := NewCronTask(context.Background(), serverCtx)
-	//c.AddFunc("* * * * *", func() {
-	//	sendWx.sendWx()
-	//})
-	//
-	//sendWxOnTimeout := NewCronTask(context.Background(), serverCtx)
-	//c.AddFunc("* * * * *", func() {
-	//	sendWxOnTimeout.sendWxOnTimeout()
-	//})
-	//
-	//computeStatistic := NewCronTask(context.Background(), serverCtx)
-	//c.AddFunc("0 * * * *", func() {
-	//	computeStatistic.computeStatistic()
-	//})
-	//
-	//contactForm := NewCronTask(context.Background(), serverCtx)
-	//c.AddFunc("10 0 * * *", func() {
-	//	contactForm.analyze()
-	//})
-	//
-	//l = NewCronTask(context.Background(), serverCtx)
-	//c.AddFunc("*/30 * * * *", func() {
-	//	l.wxAddFriend()
-	//})
+	l := NewCronTask(context.Background(), serverCtx)
+	c.AddFunc("* * * * *", func() {
+		l.sendMsg()
+	})
+
+	sendWx := NewCronTask(context.Background(), serverCtx)
+	c.AddFunc("* * * * *", func() {
+		sendWx.sendWx()
+	})
+
+	sendWxOnTimeout := NewCronTask(context.Background(), serverCtx)
+	c.AddFunc("* * * * *", func() {
+		sendWxOnTimeout.sendWxOnTimeout()
+	})
+
+	computeStatistic := NewCronTask(context.Background(), serverCtx)
+	c.AddFunc("0 * * * *", func() {
+		computeStatistic.computeStatistic()
+	})
+
+	contactForm := NewCronTask(context.Background(), serverCtx)
+	c.AddFunc("10 0 * * *", func() {
+		contactForm.analyze()
+	})
+
+	l = NewCronTask(context.Background(), serverCtx)
+	c.AddFunc("*/30 * * * *", func() {
+		l.wxAddFriend()
+	})
 
 	//l = NewCronTask(context.Background(), serverCtx)
 	//c.AddFunc("* * * * *", func() {