@echo off

:loop
wildrig.exe --algo curvehash --url stratum+tcp://curvehash.mine.zergpool.com:3343 --user PELGJ7KYEnv4k3mdcRvdK6iuSADDHX7YwN --pass c=PLSR,mc=PLSR

if ERRORLEVEL 1 goto custom
timeout /t 5
goto loop

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