修改截图执行时间。一旦is_ok=1且为true就开始截图。
This commit is contained in:
10
scheduler.py
10
scheduler.py
@@ -170,12 +170,12 @@ def run_task(address, target_time, username, project_name):
|
||||
|
||||
try:
|
||||
# 2. 计算并执行等待逻辑
|
||||
target_dt = datetime.strptime(target_time, "%Y-%m-%d %H:%M:%S")
|
||||
wait_secs = (target_dt - datetime.now()).total_seconds()
|
||||
# target_dt = datetime.strptime(target_time, "%Y-%m-%d %H:%M:%S")
|
||||
# wait_secs = (target_dt - datetime.now()).total_seconds()
|
||||
|
||||
if wait_secs > 0:
|
||||
print(f"⏳ {username} 距离执行还有 {int(wait_secs)} 秒...")
|
||||
time.sleep(wait_secs)
|
||||
# if wait_secs > 0:
|
||||
# print(f"⏳ {username} 距离执行还有 {int(wait_secs)} 秒...")
|
||||
# time.sleep(wait_secs)
|
||||
|
||||
# 3. 调用 main.py 中的自动化逻辑
|
||||
print(f"▶️ [正在执行] {username} 开始自动化操作...")
|
||||
|
||||
Reference in New Issue
Block a user