Windows 10 內建 shutdown.exe 指令支援靈活的定時關機、重開機、登出、休眠操作,無需安裝第三方定時軟體,輕量且可納入批次檔/排程器自動化。
| 需求 | 指令 | 說明 |
|---|---|---|
| 1 小時後關機 | shutdown -s -t 3600 | -s 關機,-t 秒數 (3600=1hr) |
| 30 分鐘後重開機 | shutdown -r -t 1800 | -r 重開機 |
| 立即登出 | shutdown -l | -l 登出 (無 -t 參數) |
| 休眠 (需支援) | shutdown -h | -h 休眠 |
| 取消排程關機/重開機 | shutdown -a | -a 中止 (abort) |
| 強制關閉應用程式關機 | shutdown -s -f -t 600 | -f 強制關閉應用,10 分鐘後關機 |
| 加入備註訊息 | shutdown -s -t 1800 -c "系統將於 30 分鐘後進行維護關機" | -c 註解訊息,會顯示在警告對話框 |

shutdown -s -t 3600 → 命名「1小時後關機」 → 完成。點擊即啟動倒數。shutdown.exe → 參數 -s -f -t 60。auto_shutdown.bat,雙擊執行。任何時候執行 shutdown -a 即可中止倒數,命令提示字元會顯示「已取消排程關機」。
善用原生 shutdown 指令,輕量、無廣告、可自動化,是 Windows 定時關機的最佳選擇。