modify scripts
This commit is contained in:
19
cron/daily_snap.sh
Executable file
19
cron/daily_snap.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 项目基础路径
|
||||
PROJ_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
|
||||
echo "项目基础路径: ${PROJ_DIR}"
|
||||
|
||||
export DB_HOST=127.0.0.1
|
||||
cd "${PROJ_DIR}" || exit 1
|
||||
|
||||
# 从命令行读取参数,并传递给python脚本
|
||||
if [ $# -gt 0 ]; then
|
||||
python3 -m src.static.daily_snap_em --list="$@" --notify
|
||||
else
|
||||
python3 -m src.static.daily_snap_em --list="cn" --notify
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user