在bat文件里写入代码,一行一个监控对象。
echo [%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,2%:%time:~3,2%:%time:~6,2%] >> d:domain_check.log & ping Ax3Jg57FGvN.baidu.com >> d:domain_check.log
echo [%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,2%:%time:~3,2%:%time:~6,2%] >> d:domain_check.log & ping Ax3Jg57FGvN.sina.com.cn >> d:domain_check.log
echo [%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,2%:%time:~3,2%:%time:~6,2%] >> d:domain_check.log & ping Ax3Jg57FGvN.qq.com >> d:domain_check.log
然后把这个bat脚本添加到计划任务里,比如每天下午2点执行。
生成的log文件会出现在D盘。