萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 電腦基礎知識 >  >> 電腦入門

Windows 定時關機/重開機/休眠命令 shutdown 與 at 實戰範例

shutdown 參數不分大小寫,批次檔註解用 ::。

核心參數速查

  • /s 關機、/r 重開機、/g 重開機並重啟註冊應用、/a 取消關機、/p 立即關機、/h 休眠、/t 秒數 設定倒數(0~315360000,預設 30)、/c "原因" 註釋、/f 強制關閉程式。

實戰範例

  • 指定時間關機:at 24:00 shutdown -s(需啟用 Task Scheduler)
  • 倒數 2 小時關機:shutdown -s -t 7200
  • 取消排程:shutdown -a
  • 圖形介面設定:shutdown -i
  • 組合:at 12:45 shutdown -s -t 20(12:45 關機,倒數 20 秒)

休眠相關

  • 指定時間休眠:at 8:10 rundll32 powrprof.dll,SetSuspendState
  • 啟用/關閉休眠功能:powercfg -h on/off
copyright © 萬盛學電腦網 all rights reserved