' 保持Web服务常开.vbs
' Double-click to run. Hidden console. Checks port 8000 every 60 seconds and
' auto-restarts serve_xjc.py whenever the web service goes down.
' To stop: run 停止守护.bat, or kill this wscript.exe in Task Manager.
Option Explicit
Dim shell, ps1
Set shell = CreateObject("WScript.Shell")
ps1 = "D:\doubao\tmp\酱腌菜电商看板\keep_web_alive.ps1"

' Immediate first check, then loop every 60s
Do
    shell.Run "powershell -NoProfile -ExecutionPolicy Bypass -File """ & ps1 & """", 0, True
    WScript.Sleep 60000
Loop
