monitor.bat @echo off echo.>>wget.log rem 使用wget下载网页首页文件,并记录日志 .\wget -a wget.log -d http://www.xxx.com rem 判断index.html文件是否下载成功 if exist index.html goto end echo.>>system.log echo ---------------------------->>system.log date/t>>system.log&&time/t>>system.log echo error occurred>>system.log rem 调用一个拨号批处理 call .\dial.bat exit
dial.bat @echo off rem 使用at指令传送到串口拨号 echo atdtxxxxxxx >com1 rem 延时14秒,振铃3次 choice /c yn /d y /n /t 14 >nul rem 挂机 echo ath>com1 choice /c yn /d y /n /t 5 >nul echo atdtxxxxxxx >com1 choice /c yn /d y /n /t 14 >nul echo ath>com1 choice /c yn /d y /n /t 5 >nul echo atdtxxxxxxx >com1 choice /c yn /d y /n /t 14 >nul echo ath>com1
(完)
批处理文件:
monitor.bat @echo off echo.>>wget.log rem 使用wget下载网页首页文件,并记录日志 .\wget -a wget.log -d http://www.xxx.com rem 判断index.html文件是否下载成功 if exist index.html goto end echo.>>system.log echo ---------------------------->>system.log date/t>>system.log&&time/t>>system.log