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

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

編輯:Win7 系統基礎知識

批次檔內容(存為 定時關機.bat,以系統管理員身分執行)

@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

說明

  • at 指令排程每日固定時間執行。
  • shutdown -s -t 60 關機前 60 秒倒數,-c 顯示自訂提示訊息。
  • 可自行修改時間與訊息。
Copyright © Windows教程網 All Rights Reserved