统一 crontab 时间

This commit is contained in:
CallMeR
2023-12-10 23:32:46 +08:00
parent 410f6e8d2e
commit e0c69c3fa5
3 changed files with 12 additions and 12 deletions
+4 -4
View File
@@ -372,9 +372,9 @@ $ sudo crontab -e
```bash ```bash
## 定时任务配置项 ## 定时任务配置项
15 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf 20 6 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
20 5 * * * /usr/bin/systemctl restart smartdns.service 30 6 * * * /usr/bin/systemctl restart smartdns.service
``` ```
@@ -382,9 +382,9 @@ $ sudo crontab -e
```bash ```bash
## 定时任务配置项 ## 定时任务配置项
15 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf 20 6 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
20 5 * * * /usr/bin/bash /opt/smartdns_plugin.sh 30 6 * * * /usr/bin/bash /opt/smartdns_plugin.sh
``` ```
### 6.4.配置 Dnsmasq ### 6.4.配置 Dnsmasq
+4 -4
View File
@@ -6,11 +6,11 @@ $ sudo chmod +x /opt/dnsmasq_plugin.sh
## 设置 crontab ## 设置 crontab
15 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf 20 6 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
20 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/dnsmasq.d/anti-ad-dnsmasq.conf https://anti-ad.net/anti-ad-for-dnsmasq.conf 25 6 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/dnsmasq.d/anti-ad-dnsmasq.conf https://anti-ad.net/anti-ad-for-dnsmasq.conf
25 5 * * * /usr/bin/systemctl restart smartdns.service 30 6 * * * /usr/bin/systemctl restart smartdns.service
30 5 * * * /usr/bin/bash /opt/dnsmasq_plugin.sh 35 6 * * * /usr/bin/bash /opt/dnsmasq_plugin.sh
+4 -4
View File
@@ -1,14 +1,14 @@
# This configuration file is customized by fox, # This configuration file is customized by fox,
# Optimize SmartDNS crontab for local DNS server. # Optimize SmartDNS crontab for local DNS server.
15 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf 20 6 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
20 5 * * * /usr/bin/systemctl restart smartdns.service 30 6 * * * /usr/bin/systemctl restart smartdns.service
## Or when the smartdns plugin is installed ## Or when the smartdns plugin is installed
15 5 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf 20 6 * * * /usr/bin/curl -s -R --retry 5 --retry-connrefused --retry-delay 5 --retry-max-time 60 -o /etc/smartdns.d/anti-ad-smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
20 5 * * * /usr/bin/bash /opt/smartdns_plugin.sh 30 6 * * * /usr/bin/bash /opt/smartdns_plugin.sh