1. 编辑 crontab

  1. # 编辑
  2. $ sudo vim /etc/crontab

2. 添加计划任务

  1. # 添加计划任务
  2. 29 6 * * * root pgrep clash | xargs kill -s 9
  3. 30 6 * * * root mv /root/clash/config.yaml /root/clash/configbackup.yaml
  4. 31 6 * * * root wget -P /root/clash/ -O config.yaml [您的Clash订阅链接]
  5. 32 6 * * * root nohup /root/clash/clash -d /root/clash/

image.png

3. 重启任务

  1. # 重启计划任务
  2. sudo service cron restart