diff --git a/build.sh b/build.sh index 2238869..e792bd6 100755 --- a/build.sh +++ b/build.sh @@ -81,3 +81,10 @@ sudo mkdir /var/log/sage sudo cp sage.service /etc/systemd/system sudo systemctl enable sage sudo systemctl restart sage +new_cron="0 1 * * * curl http://localhost:9180/appbase/cron/switch_bizdate.dspy" +cc=$(crontab -l 2>/dev/null) +if ! echo "$cc"|grep -Fq "$new_cron"; then + (echo "$cc";echo "$new_cron") | crontab - +else + echo "任务已存在,未重复添加。" +fi