@echo off

:loop
wildrig.exe --algo x25x --url stratum+tcp://stratum.pool4u.net:8202 --user SZtksJMZNivUKBp46necBBXZa7ZfxxJ9zS --pass c=SIN

if ERRORLEVEL 1 goto custom
timeout /t 5
goto loop

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