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

Windows 7 定時關機批次檔:一分鐘前提醒、可自訂排程

編輯:Win7 系統基礎知識

實用批次檔範例,支援多時段排程關機,關機前 60 秒彈出訊息提醒,適合固定作息或停電預警場景。

@echo off
at 22:50 every:M,T,W,Th,F,S,Su shutdown -s -t 60 -c "很晚了,該睡覺了!"
at 13:50 every:M,T,W,Th,F,S,Su shutdown -s -t 60 -c "要停電了,快存檔吧!"
at 15:50 every:M,T,W,Th,F,S,Su shutdown -s -t 60 -c "要停電了,快存檔吧!"
at 9:50 every:M,T,W,Th,F,S,Su shutdown -s -t 60 -c "要停電了,快存檔吧!"
at 5:50 every:M,T,W,Th,F,S,Su shutdown -s -t 60 -c "要停電了,快存檔吧!"
echo 已經完成!
pause&end

使用方法

  1. 將上述內容存為 定時關機.bat
  2. 以系統管理員身分執行
  3. 排程將寫入系統排程器,依設定時間自動觸發

參數說明:shutdown -s 關機、-t 60 60 秒倒數、-c 自訂提示訊息。可依需求增減時段與訊息。

Copyright © Windows教程網 All Rights Reserved