请高手帮忙改下批处理

来源:百度知道 编辑:UC知道 时间:2024/06/30 00:44:00
这是一个时间段内自动关机的批处理,现在能实现的功能是少于早上6点自动关机,超过下午17点自动关机。

@echo off
if %time% lss 00:00:00.00 goto 0_9 rem 0点
if %time% gtr 23:59:59.99 goto 0_9 rem 3点至9点
if %time% gtr 09:59:59:99 goto if1 rem 1点
if %time% gtr 19:59:59:99 goto if2 rem 2点
goto 10_23

:if1
if %time% lss 10:00:00:00 goto 0_9
goto 10_23

:if2
if %time% lss 20:00:00:00 goto 0_9
goto 10_23

:0_9
if %time% lss 6:00:00:00 goto exec
goto end

:10_23
if %time% gtr 17:00:00:00 goto exec
goto end
:exec
call shutdown /s /t 60
:end
exit

我想再加一个时间段,中午12点到13点30自动关机,应该怎么写??学过一点PHP,批处理能看懂点,但是动手的话就不会了,请高手帮帮忙,谢谢!~
补充一下,早上9点到12点机器正常运行,不能关机,下午13点30到17点正常运行,其他时间段一律关机!~请按照这个要求修改,谢谢各位高手!~

::改好了,9点版。
@echo off
if "%time:~0,1%"=="" (set timeis=%time:~1,2%%time:~3,2%) else (set timeis=%time:~0,2%%time:~3,2%)
:start
if %timeis% lss 900 (goto shutdownit) else (if %timeis% geq 1200 if %timeis% leq 1330 (goto shutdownit) else (if %timeis% geq 1700 (goto shutdownit)))
ping 127.1 -n 30 1>nul 2>nul
goto start
:shutdownit
shutdown -s -f -t 0

@echo off

:again

if %time% lss 06:00:00.00 goto done

if %time% lss 12:00:00.00 ping 127.1 -n 30 & goto again

if %time% lss 13:30:00.00 goto done

if %time% lss 17:00:00.00 ping 127.1 -n 30 & goto again

:done

shutdown -s -f -t 0 

请点击下图,有详细解释。刷不出,请按F5刷新。

请批处理高手帮忙 请bat 批处理高手帮忙 请高手帮忙改下,谢谢! 请各位高手帮忙作个批处理 请批处理高手帮忙(arp) 请高手帮忙写个批处理。 批处理问题,请高手帮忙啊 请高手帮忙看下这首诗(或帮忙改下) 请高手帮忙改下这个c程序 急,请编程高手帮忙,帮我改下程序