build.sh: add daily forex rate fetch cron (8:00)
This commit is contained in:
parent
ac2f691e1b
commit
bc9794b770
8
build.sh
8
build.sh
@ -93,3 +93,11 @@ if ! echo "$cc"|grep -Fq "$new_cron"; then
|
|||||||
else
|
else
|
||||||
echo "任务已存在,未重复添加。"
|
echo "任务已存在,未重复添加。"
|
||||||
fi
|
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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user