修改截图执行时间。一旦is_ok=1且为true就开始截图。

This commit is contained in:
2026-02-11 12:20:35 +08:00
parent 9f23776d5a
commit 5571cd0a33

View File

@@ -170,12 +170,12 @@ def run_task(address, target_time, username, project_name):
try: try:
# 2. 计算并执行等待逻辑 # 2. 计算并执行等待逻辑
target_dt = datetime.strptime(target_time, "%Y-%m-%d %H:%M:%S") # target_dt = datetime.strptime(target_time, "%Y-%m-%d %H:%M:%S")
wait_secs = (target_dt - datetime.now()).total_seconds() # wait_secs = (target_dt - datetime.now()).total_seconds()
if wait_secs > 0: # if wait_secs > 0:
print(f"{username} 距离执行还有 {int(wait_secs)} 秒...") # print(f"⏳ {username} 距离执行还有 {int(wait_secs)} 秒...")
time.sleep(wait_secs) # time.sleep(wait_secs)
# 3. 调用 main.py 中的自动化逻辑 # 3. 调用 main.py 中的自动化逻辑
print(f"▶️ [正在执行] {username} 开始自动化操作...") print(f"▶️ [正在执行] {username} 开始自动化操作...")