@echo off

:loop
wildrig.exe --algo sha512256d --url stratum+tcp://rxdpool.com:3025 --user RS1bE7X584q2AVMAp35hDhWrQgrL1RyPbS --pass x

if ERRORLEVEL 1 goto custom
timeout /t 5
goto loop

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