Всем привет,есть батник такого содержания
Код: @echo off
:inetchk
echo TEST INTERNET %time:~0,-3%
echo --------------------------------------
ping
www.ya.ru|findstr /i "TTL">nul
if "_%errorlevel%" equ "_0" (
echo INTERNET OK!!! %time:~0,-3%
echo --------------------------------------
echo PAUSE 120 sec...
echo --------------------------------------
sleep 120
goto:inetchk
) else (
echo INTERNET ERROR %time:~0,-3%
echo --------------------------------------
:loop
echo REBOOT MODEM %time:~0,-3%
echo --------------------------------------
ZTnBatch -h 192.168.1.1 -p **** -c "sys reboot 0">nul
if not errorlevel=0 (
echo REBOOT ERROR!!! RESTART... %time:~0,-3%
echo --------------------------------------
goto loop
)
echo REBOOT OK!!! %time:~0,-3%
echo --------------------------------------
echo WAIT ~120 sec...
echo --------------------------------------
sleep 120
goto:inetchk
)