diff --git a/build.sh b/build.sh index 8c41bdca..6233aa00 100755 --- a/build.sh +++ b/build.sh @@ -93,3 +93,11 @@ if ! echo "$cc"|grep -Fq "$new_cron"; then else echo "任务已存在,未重复添加。" fi + +# 每日 8:00 抓取外汇牌价 +forex_cron="0 8 * * * curl -s http://localhost:9180/accounting/api/fetch_forex_rates.dspy" +if ! echo "$cc"|grep -Fq "fetch_forex_rates"; then + (echo "$cc";echo "$forex_cron") | crontab - +else + echo "汇率任务已存在,未重复添加。" +fi