yEs1do 1 년 전
부모
커밋
e29bbceb5d
1개의 변경된 파일과 3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      tasks/Restart/script_task.py

+ 3 - 3
tasks/Restart/script_task.py

@@ -49,13 +49,13 @@ class ScriptTask(LoginHandler):
             now = datetime.now()
             # 如果时间在00:00-12:00之间则设定时间为当日 12 时
             if now.time() < time(12, 0):
-                self.custom_next_run(task='Restart', custom_time=Time(hour=12, minute=0, second=0), time_delta=0)
+                self.custom_next_run(task='Restart', custom_time=Time(12, 0), time_delta=0)
             # 如果时间在12:00-20:00之间则设定时间为当日 20 时
             elif now.time() >= time(12, 0) and now.time() < time(20, 0):
-                self.custom_next_run(task='Restart', custom_time=Time(hour=20, minute=0, second=0), time_delta=0)
+                self.custom_next_run(task='Restart', custom_time=Time(20, 0), time_delta=0)
             # 如果时间在20:00-23:59之间则设定时间为次日 12 时
             else:
-                self.custom_next_run(task='Restart', custom_time=Time(hour=12, minute=0, second=0), time_delta=1)
+                self.custom_next_run(task='Restart', custom_time=Time(12, 0), time_delta=1)