docker 不支持 动态显示

master
Administrator 2024-05-02 13:16:38 +08:00
parent e960193151
commit e4e05b58f7
1 changed files with 4 additions and 4 deletions

View File

@ -32,8 +32,8 @@ _/ ____\______ ____ _____ _____ ____ __ _ _______ ____ ____
if remainingTime <= 0 {
break // 当剩余时间小于等于0时跳出循环
}
fmt.Printf("\r距离执行定时任务还剩 %d小时 %d分钟 %d秒", int(remainingTime.Hours()), int(remainingTime.Minutes())%60, int(remainingTime.Seconds())%60)
time.Sleep(time.Second) // 等待一秒钟,然后更新
fmt.Printf("距离执行定时任务还剩 %d小时 %d分钟 %d秒\n", int(remainingTime.Hours()), int(remainingTime.Minutes())%60, int(remainingTime.Seconds())%60)
time.Sleep(time.Minute * 10) // 等待30分钟钟,然后更新
}
// 定义任务,每周五的五点执行
gocron.Every(1).Friday().At("17:00").Do(job)