cmd 记录运行日志的问题
我找了一个Apache守护进程cmd
@echo off
net start | find /c /i "apache2.2" > nul
if "%errorlevel%" == "1" goto startapache
goto exit
:startapache
net start apache2.2
:exit
我添加了计划任务1分钟执行一次!
我想在Apache挂掉时记录重启Apache时间 的文本文件日志!方便以后看是些时间段Apache挂掉了,掉了几次等信息!
我对CMD命令不是特别熟悉,不知道守护CMD写的对不对,我试了停止服务后这个CMD可以启动Apache,就不知道Apache挂了能不能起到作用!
望高手指点!