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

Win7 定時自動關機一行指令:shutdown -s -t 秒數,無需第三方軟體

編輯:Windows 7 系統介紹

核心指令

Win+R → shutdown -s -t 3600 → **1 小時 (3600 秒) 後自動關機**

參數解析

參數含義
-s關機
-r重新開機
-l登出
-h休眠
-t xxx延遲秒數 (0-315360000,最大 10 年)
-c "訊息"關機提示訊息
-a**取消排程關機** (救命指令)
-f強制關閉應用程式 (不提示儲存)

實用範例

  • 30 分鐘後重開機:shutdown -r -t 1800
  • 晚上 11 點關機 (假設現在 20:00):shutdown -s -t 39600
  • 顯示自訂訊息:shutdown -s -t 600 -c "系統將在 10 分鐘後關機進行維護,請儲存工作"
  • **取消排程**:shutdown -a (隨時可執行)

進階:排程工作實現每日定時關機

  1. 控制台 → 「系統與安全性」 → 「排程工作」 → 「建立基本工作」
  2. 觸發條件:「每天」→ 設定時間 (如 23:00)
  3. 動作:「啟動程式」→ 程式:shutdown.exe → 引數:-s -f -t 60
  4. 完成 → 測試:右鍵工作 → 「執行」
  5. 注意事項

    • -f 會強制關閉未儲存文件,**請確保無重要未存作業**
    • 關機前 1 分鐘會彈出提示,可手動 shutdown -a 取消
    • 睡眠/休眠狀態下**不會**觸發排程關機
Copyright © Windows教程網 All Rights Reserved