crontab 

crontab -e
17 10 * * Mon,Tue,Wed,Thu /home/restart_supervisor.sh

执行权限

cd /home
chmod +x restart_supervisor.sh

 restart_supervisor.sh

#!/bin/sh
export PATH=$PATH:/usr/local/python3/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/node-v8.11.4/bin:/root/bin:   # 通过$PATH获取
cd /www/app_store_spider/   # 进入虚拟环境目录
pipenv shell  # 激活pipenv
kill -9 `ps -ef |grep python|awk '{print $2}' `&&unlink /*/*/supervisor.sock && sleep 3 && supervisord -c /etc/supervisord.conf  # 执行命令

 

相关文章:

  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2021-06-30
猜你喜欢
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2022-01-29
  • 2022-02-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案