diff --git a/scripts/deploy_gpu_monitor.sh b/scripts/deploy_gpu_monitor.sh index de4f9cb..005f9af 100644 --- a/scripts/deploy_gpu_monitor.sh +++ b/scripts/deploy_gpu_monitor.sh @@ -67,7 +67,7 @@ restart_node_exporter() { # 安全添加定时任务(避免重复) add_cron_job() { - local cron_line="${CRON_SCHEDULE} ${TARGET_SCRIPT} >> ${LOG_FILE} 2>&1" + local cron_line="${CRON_SCHEDULE} bash ${TARGET_SCRIPT} >> ${LOG_FILE} 2>&1" # 检查任务是否已存在(精确匹配) if crontab -l 2>/dev/null | grep -qxF "${cron_line}"; then