天天看点

windows bat文件实现定时关机和定时重启

shut.bat 定时关机文件

set /p time=“How much seconds will it take to turn off the computer?”

shutdown /s /t “%time%”

pause

reboot.bat 定时重启文件

set /p time=“How much seconds will it take to restart the computer?”

shutdown /r /t “%time%”

pause

执行流程

双击shut.bat或reboot.bat

windows bat文件实现定时关机和定时重启
windows bat文件实现定时关机和定时重启

输入时间后按下回车【enter】即可,一次不够再按一次