请问如何用CMD实现每天定时关机

来源:百度知道 编辑:UC知道 时间:2024/09/24 06:55:26
用shutdonw命令,不用别的软件就用命令

@echo off
sc config Schedule start= auto
sc start Schedule
at 17:04 /interactive /every:M,T,W,Th,F,S,Su "shutdown -s -t 30"
exit

运行 一次 这个批处理就可以了。
其中,at开头那一行中,17:04即定时关机的时间,30是定时关机时,首先弹出30秒的提示。两处可以根据需要自行修改。

附:批处理,就是把这段代码复制到记事本中,然后另存为.bat后缀的文件,双击即可像程序一样运行。