数据库备份。bat
@echo off
c:\xampp\mysql\bin\mysqldump -upig -p123456 xxx> c:\web\backup\%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%.sql
exit
服务重启。vbs
Set ws = CreateObject("Wscript.Shell")
ws.run "cmd /c c:\web\restart_service.bat",vbhide
服务重启。bat
@echo off
call c:\xampp\apache_stop.bat
call c:\xampp\apache_start.bat
call c:\xampp\mysql_stop.bat
call c:\xampp\mysql_start.bat
exit;
然后设置定时任务就可以了,参考:https://jingyan.baidu.com/article/39810a2396cef6b637fda67c.html