diff --git a/archive/archive.go b/archive/archive.go index 0d13f12..b62a779 100644 --- a/archive/archive.go +++ b/archive/archive.go @@ -77,7 +77,7 @@ func CustProduct(conf *config.EnvConfig) { timeStart, _ := time.ParseInLocation(timeLayout, stime, loc) timeEnd, _ := time.ParseInLocation(timeLayout, etime, loc) now := time.Now() - if now.After(timeStart) && now.Before(timeEnd) { + if now.After(timeEnd) || now.Before(timeStart) { time.Sleep(60 * time.Second) continue } @@ -1013,7 +1013,7 @@ func ArchiveJit_shiporder(conf *config.EnvConfig) { timeStart, _ := time.ParseInLocation(timeLayout, stime, loc) timeEnd, _ := time.ParseInLocation(timeLayout, etime, loc) now := time.Now() - if now.After(timeStart) && now.Before(timeEnd) { + if now.After(timeEnd) || now.Before(timeStart) { time.Sleep(60 * time.Second) continue } @@ -1347,7 +1347,7 @@ func ArchiveJit_packorder(conf *config.EnvConfig) { timeStart, _ := time.ParseInLocation(timeLayout, stime, loc) timeEnd, _ := time.ParseInLocation(timeLayout, etime, loc) now := time.Now() - if now.After(timeStart) && now.Before(timeEnd) { + if now.After(timeEnd) || now.Before(timeStart) { time.Sleep(60 * time.Second) continue } @@ -1501,11 +1501,11 @@ func DelPrinterInfo(conf *config.EnvConfig) { now := time.Now() fmt.Println(timeStart) fmt.Println(timeEnd) - if now.After(timeStart) && now.Before(timeEnd) { + if now.After(timeEnd) || now.Before(timeStart) { + fmt.Println("不在处理时间内!") time.Sleep(60 * time.Second) continue } - var ( err error oneWeek time.Time