统一时间规划

This commit is contained in:
CallMeR
2023-07-26 14:57:51 +08:00
parent 17ae656734
commit 17ab25b998
6 changed files with 16 additions and 17 deletions
+10 -11
View File
@@ -213,7 +213,7 @@ $ crontab -e
```bash ```bash
## 定时任务配置项 ## 定时任务配置项
0 5 1,16 * * /usr/sbin/reboot 30 2 1,16 * * /usr/sbin/reboot
``` ```
@@ -223,7 +223,7 @@ $ crontab -e
配置系统自动更新之前,需检查系统当前定时器状态。 配置系统自动更新之前,需检查系统当前定时器状态。
后续将手动调整该定时器的时间,使其每 `5` 天凌晨 `02:00` 进行触发。 后续将手动调整该定时器的时间,使其每 `5` 天凌晨 `01:30` 进行触发。
```bash ```bash
## 检查系统定时器 ## 检查系统定时器
@@ -305,7 +305,7 @@ $ nano /etc/apt/apt.conf.d/50unattended-upgrades
- 自动重启:开启。 - 自动重启:开启。
- 自动重启时间:`05:00` - 自动重启时间:`02:30`
因为该配置文件很长,完整的配置文件可查看 [pve_50unattended_upgrades.conf](./src/pve_50unattended_upgrades.conf) 以便对比。 因为该配置文件很长,完整的配置文件可查看 [pve_50unattended_upgrades.conf](./src/pve_50unattended_upgrades.conf) 以便对比。
@@ -334,7 +334,7 @@ Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "true"; Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "05:00"; Unattended-Upgrade::Automatic-Reboot-Time "02:30";
``` ```
@@ -356,7 +356,7 @@ $ systemctl edit apt-daily-upgrade.timer
[Timer] [Timer]
OnCalendar= OnCalendar=
OnCalendar=02:00 OnCalendar=01:30
RandomizedDelaySec=0 RandomizedDelaySec=0
``` ```
@@ -375,14 +375,13 @@ $ systemctl status apt-daily-upgrade.timer
Loaded: loaded (/lib/systemd/system/apt-daily-upgrade.timer; enabled; preset: enabled) Loaded: loaded (/lib/systemd/system/apt-daily-upgrade.timer; enabled; preset: enabled)
Drop-In: /etc/systemd/system/apt-daily-upgrade.timer.d Drop-In: /etc/systemd/system/apt-daily-upgrade.timer.d
└─override.conf └─override.conf
Active: active (waiting) since Sun 2023-06-25 14:35:06 CST; 9s ago Active: active (waiting) since Wed 2023-07-26 14:38:06 CST; 11s ago
Until: Sun 2023-06-25 14:35:06 CST; 9s ago Trigger: Thu 2023-07-27 01:30:00 CST; 10h left
Trigger: Mon 2023-06-26 02:00:00 CST; 11h left
Triggers: ● apt-daily-upgrade.service Triggers: ● apt-daily-upgrade.service
Jun 25 14:35:06 node01 systemd[1]: Stopped apt-daily-upgrade.timer - Daily apt upgrade and clean activities. Jul 26 14:38:06 node01 systemd[1]: Stopped apt-daily-upgrade.timer - Daily apt upgrade and clean activities.
Jun 25 14:35:06 node01 systemd[1]: Stopping apt-daily-upgrade.timer - Daily apt upgrade and clean activities... Jul 26 14:38:06 node01 systemd[1]: Stopping apt-daily-upgrade.timer - Daily apt upgrade and clean activities...
Jun 25 14:35:06 node01 systemd[1]: Started apt-daily-upgrade.timer - Daily apt upgrade and clean activities. Jul 26 14:38:06 node01 systemd[1]: Started apt-daily-upgrade.timer - Daily apt upgrade and clean activities.
``` ```
## 5.硬件直通 ## 5.硬件直通
+2 -2
View File
@@ -354,7 +354,7 @@ Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "true"; Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "04:30"; Unattended-Upgrade::Automatic-Reboot-Time "03:00";
``` ```
@@ -406,7 +406,7 @@ $ sudo crontab -e
```bash ```bash
## 定时任务配置项 ## 定时任务配置项
0 6 8,24 * * /usr/sbin/reboot 30 4 8,24 * * /usr/sbin/reboot
``` ```
+1 -1
View File
@@ -171,7 +171,7 @@ $ sudo crontab -e
```bash ```bash
## 定时任务配置项 ## 定时任务配置项
0 5 * * * /usr/bin/snap restart adguard-home 30 4 * * * /usr/bin/snap restart adguard-home
``` ```
+1 -1
View File
@@ -173,5 +173,5 @@ Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "true"; Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "04:30"; Unattended-Upgrade::Automatic-Reboot-Time "03:00";
+1 -1
View File
@@ -175,5 +175,5 @@ Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "true"; Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "05:00"; Unattended-Upgrade::Automatic-Reboot-Time "02:30";
+1 -1
View File
@@ -3,7 +3,7 @@
[Timer] [Timer]
OnCalendar= OnCalendar=
OnCalendar=02:00 OnCalendar=01:30
RandomizedDelaySec=0 RandomizedDelaySec=0
### Lines below this comment will be discarded ### Lines below this comment will be discarded