shutdown -s -t <秒數>
-s:關機 (Shutdown)。-t <秒數>:倒數秒數 (例如 3600 = 1 小時,5400 = 1.5 小時,7200 = 2 小時)。shutdown -s -t 5400
shutdown -a (Abort)。
| 參數 | 功能 | 範例 |
|---|---|---|
-s | 關機 | shutdown -s -t 3600 |
-r | 重新開機 | shutdown -r -t 600 |
-a | 取消排程關機/重啟 | shutdown -a |
-h | 休眠 | shutdown -h |
-f | 強制關閉應用程式 (不提示儲存) | shutdown -s -f -t 0 (立即強制關機) |
-c "訊息" | 自訂關機提示訊息 | shutdown -s -t 1800 -c "30分鐘後關機,請儲存檔案" |
/l | 登出 | shutdown /l |
shutdown -s -t 3600 -c "1小時後自動關機"shutdown -a。shutdown.exe-s -f -t 60 -c "排程關機,60秒後關機"定時關機前請確認已儲存所有工作。-f參數會強制關閉程式,**不會提示儲存**,可能導致資料遺失。建議搭配-c顯示警告訊息給使用者準備時間。