|
|
@@ -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)
|
|
|
|
|
|
|
|
|
|