forked from yindun/ansible-devops
更新 scripts/deploy_gpu_monitor.sh
This commit is contained in:
parent
4586e980b9
commit
27ba57ad6e
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue