Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Win7 定時自動關機指令教學:shutdown 命令參數詳解與取消方法

編輯:Windows 7 系統介紹

Win7 無圖形化定時關機介面,但內建 shutdown.exe 命令支援豐富參數,透過 CMD 即可實現精確定時關機、重開機、登出、休眠。

基本語法

shutdown [參數] [時間(秒)]

常用參數

參數功能
-s關機
-r重開機
-l登出
-h休眠
-f強制關閉應用程式不提示
-t xxx設定倒數秒數 (預設 30 秒)
-a中止已排程的關機/重開機
-c "訊息"顯示關機提示訊息

實用範例

  • 1 小時後關機:shutdown -s -f -t 3600
  • 30 分鐘後重開機並提示:shutdown -r -f -t 1800 -c "系統維護重開機,請儲存工作"
  • 取消排程:shutdown -a
  • 立即關機:shutdown -s -f -t 0

操作步驟

  1. Win+R → cmd 開啟命令提示字元。
  2. 輸入上述指令按 Enter。
  3. 螢幕右下角彈出倒數通知,確認排程已建立。

執行cmd

輸入shutdown指令

倒數通知

進階:建立捷徑一鍵執行

  1. 桌面右鍵 →「新增」→「捷徑」。
  2. 位置輸入:shutdown -s -f -t 3600。
  3. 命名「1小時後關機」,完成。未來雙擊即可啟動倒數。
  4. 同理建立「取消關機」捷徑:shutdown -a。

任務排程器自動化(進階)

控制台 →「系統管理工具」→「工作排程器」→ 建立基本工作 → 觸發條件設定時間 → 動作「啟動程式」:shutdown.exe,引數 -s -f -t 0,可實現每日定時關機。

Copyright © Windows教程網 All Rights Reserved