作者 tangxvhui

调整运行时间

@@ -7,9 +7,10 @@ import ( @@ -7,9 +7,10 @@ import (
7 ) 7 )
8 8
9 func PushData() { 9 func PushData() {
  10 + //每天16点运行
10 nowTime := time.Now() 11 nowTime := time.Now()
11 y, m, d := nowTime.Date() 12 y, m, d := nowTime.Date()
12 - t1 := time.Date(y, m, d, 10, 0, 0, 0, time.Local) //今天的10 13 + t1 := time.Date(y, m, d, 16, 0, 0, 0, time.Local) //今天的16
13 interval := t1.Sub(nowTime) 14 interval := t1.Sub(nowTime)
14 if interval < 0 { 15 if interval < 0 {
15 interval = (24 * time.Hour) + interval 16 interval = (24 * time.Hour) + interval