@echo off rem Engine of the web simulator, restarted automatically if it stops (crash, network loss at boot, manual kill). rem Started hidden by web_sim_autostart.vbs; output goes to web_sim_data\backend.log. cd /d "%~dp0" set PYTHONIOENCODING=utf-8 if not exist web_sim_data mkdir web_sim_data :loop echo [%date% %time%] start >> web_sim_data\backend.log if exist ".venv\Scripts\python.exe" ( ".venv\Scripts\python.exe" web_sim.py --backend >> web_sim_data\backend.log 2>&1 ) else ( py -3 web_sim.py --backend >> web_sim_data\backend.log 2>&1 ) echo [%date% %time%] stopped, restart in 5 s >> web_sim_data\backend.log timeout /t 5 /nobreak >nul goto loop