定时重启脚本并添加执行日志(sqlserver+iis) AutoReboot.bat 执行日志
echo SQL ReStart:%date%%time%>>REBOOTLOG.txt
net stop sqlserveragent>>REBOOTLOG.txt
net stop mssqlserver>>REBOOTLOG.txt
net start sqlserveragent>>REBOOTLOG.txt
echo SQL End:%date%%time%>>REBOOTLOG.txt
echo IIS ReStart:%date%%time%>>REBOOTLOG.txt
C:\Windows\System32\iisreset.exe
echo IIS End:%date%%time%>>REBOOTLOG.txt
编辑后存储为bat格式,放到计划任务中定时执行即可