From 94ac6eb54b7b97ed5c228d9d263ea4b30e05640b Mon Sep 17 00:00:00 2001 From: Rixuan Shao <2023311022@bipt.edu.cn> Date: Thu, 21 May 2026 21:41:29 +0800 Subject: [PATCH] Fix scheduled cron trigger timestamp formatting --- DouYinSparkFlow/webui/ops.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DouYinSparkFlow/webui/ops.py b/DouYinSparkFlow/webui/ops.py index 6f95128..9a88442 100644 --- a/DouYinSparkFlow/webui/ops.py +++ b/DouYinSparkFlow/webui/ops.py @@ -72,7 +72,7 @@ def build_task_run_spec(): def build_scheduled_task_command(): if running_in_container(): return ( - "/bin/bash -lc 'timestamp=$(date \"+%F %T %Z\"); " + "/bin/bash -lc 'timestamp=$(date -Iseconds); " "echo \"[AUTO_TRIGGER] $timestamp scheduled send start\"; " "container=$(docker ps --format \"{{.Names}}\" | " "grep -E \"^(douyin-web-hostfix|douyin-web)$\" | head -n 1); " @@ -88,14 +88,14 @@ def build_scheduled_task_command(): compose_root_quoted = shlex.quote(str(compose_root())) return ( "/bin/bash -lc " - f"'echo \"[AUTO_TRIGGER] $(date \"+%F %T %Z\") compose task start\"; " + f"'echo \"[AUTO_TRIGGER] $(date -Iseconds) compose task start\"; " f"cd {compose_root_quoted} && /usr/bin/docker compose run --rm task'" ) repo_root_quoted = shlex.quote(str(repo_root())) python_quoted = shlex.quote(sys.executable) return ( "/bin/bash -lc " - f"'echo \"[AUTO_TRIGGER] $(date \"+%F %T %Z\") local task start\"; " + f"'echo \"[AUTO_TRIGGER] $(date -Iseconds) local task start\"; " f"cd {repo_root_quoted} && {python_quoted} main.py --doTask'" )