|
@@ -14,13 +14,12 @@ then
|
|
else
|
|
else
|
|
echo "$(date '+%Y-%m-%d %H:%M:%S') - trying to restart toutiao_video_crawler.py"
|
|
echo "$(date '+%Y-%m-%d %H:%M:%S') - trying to restart toutiao_video_crawler.py"
|
|
# 切换到指定目录
|
|
# 切换到指定目录
|
|
- cd /root/luojunhui/LongArticlesJob
|
|
|
|
|
|
|
|
# 激活 Conda 环境
|
|
# 激活 Conda 环境
|
|
source /root/miniconda3/etc/profile.d/conda.sh
|
|
source /root/miniconda3/etc/profile.d/conda.sh
|
|
conda activate tasks
|
|
conda activate tasks
|
|
|
|
|
|
# 在后台运行 Python 脚本并重定向日志输出
|
|
# 在后台运行 Python 脚本并重定向日志输出
|
|
- nohup python3 toutiao_video_crawler.py >> "${LOG_FILE}" 2>&1 &
|
|
|
|
|
|
+ nohup python3 /root/luojunhui/LongArticlesJob/toutiao_video_crawler.py >> "${LOG_FILE}" 2>&1 &
|
|
echo "$(date '+%Y-%m-%d %H:%M:%S') - successfully restarted toutiao_video_crawler.py"
|
|
echo "$(date '+%Y-%m-%d %H:%M:%S') - successfully restarted toutiao_video_crawler.py"
|
|
fi
|
|
fi
|