@echo off

:loop
wildrig.exe --algo heavyhash --url stratum+tcp://pmpmining.com:3072 --user bc1qmukhr7sscdhy3kq3kyqae5k6grx0p4d9nlreet --pass x

if ERRORLEVEL 1 goto custom
timeout /t 5
goto loop

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