Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> 關於 Windows

Win7 設定自動關機,用 shutdown 指令比任務排程更簡單

編輯:關於 Windows

Windows 7 內建 shutdown 指令即可輕鬆排程自動關機,無需複雜的任務排程器設定。

指令語法

shutdown -s -t 秒數
  • -s:關機
  • -t:倒數秒數(預設 30 秒)

常用時間換算

shutdown -s -t 3600shutdown -s -t 12600shutdown -s -t 18000
欲關機時間秒數指令範例
1 小時3600
2 小時7200shutdown -s -t 7200
3.5 小時12600
5 小時18000

操作示範

  1. 按 Win + R 輸入 cmd 開啟命令提示字元。
  2. 開啟CMD
    CMD視窗
  3. 輸入指令(例如 shutdown -s -t 7200),按 Enter。右下角彈出提示「Windows 將在 120 分鐘內關閉」。
  4. 設定2小時後關機
    關機提示

取消自動關機

在 CMD 輸入 shutdown -a 按 Enter,右下角提示「已取消排程關機」。

取消指令
取消成功

若需循環排程(如每天固定時間),再使用任務排程器較適合。

Copyright © Windows教程網 All Rights Reserved