# 数据的日期
date_tuple=('20231106')
basepath=代码的路径
for date in "${date_tuple[@]}"; do
# 数据的小时
for hour in {0..23}; do
if [ $hour -lt 10 ]; then
hour_str="0$hour"
else
hour_str="$hour"
fi
data_hour="$date$hour_str"
echo "正在执行 $data_hour"
$basepath/python_app $data_hour >$basepath/python_app.log 2>&1
current_time=$(date "+%Y%m%d %H:%M:%S")
echo "运行结束:"${current_time}
done
done