@echo off
setlocal
set "AGENTDIR=%~dp0"
if "%AGENTDIR:~-1%"=="\" set "AGENTDIR=%AGENTDIR:~0,-1%"
cd /d "%AGENTDIR%"

:loop
node index.js
echo [%date% %time%] agente encerrou -- reiniciando em 5s...
timeout /t 5 /nobreak >nul
goto loop
