更新 scripts/deploy_gpu_monitor.sh
This commit is contained in:
parent
27ba57ad6e
commit
29ad113b1c
|
|
@ -67,7 +67,7 @@ restart_node_exporter() {
|
||||||
|
|
||||||
# 安全添加定时任务(避免重复)
|
# 安全添加定时任务(避免重复)
|
||||||
add_cron_job() {
|
add_cron_job() {
|
||||||
local cron_line="${CRON_SCHEDULE} bash ${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
|
if crontab -l 2>/dev/null | grep -qxF "${cron_line}"; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue