@echo off

:loop
wildrig.exe --algo evrprogpow --url stratum+tcp://stratum.evrpool.com:1111 --user Ef2EXrmvNhFPS7GEx4toSxEMMSoPtUg2iA --pass x

if ERRORLEVEL 1 goto custom
timeout /t 5
goto loop

:custom
echo Custom command here
timeout /t 5
goto loop