2022-09-01 12:32:57 +00:00
|
|
|
#!/bin/bash
|
2022-09-25 15:04:27 +00:00
|
|
|
|
|
|
|
# 输出日志路径
|
|
|
|
stdout_path=$(cd `dirname $0`;pwd)/stdout.log
|
|
|
|
# 1-1200秒随机延时
|
|
|
|
# 随机值$RANDOM值为1~32767
|
|
|
|
delay=$[$RANDOM%1200];
|
|
|
|
|
2022-09-01 12:32:57 +00:00
|
|
|
# 进入脚本所在目录
|
|
|
|
cd $(cd `dirname $0`;pwd)
|
2022-09-25 15:04:27 +00:00
|
|
|
|
|
|
|
echo "$(date) $[$delay/60]分钟后开始执行" > $stdout_path;
|
|
|
|
sleep $delay;
|
|
|
|
python3 main.py >> $stdout_path;
|