@SET RTKLOADER="%INTIME%\bin\nodemgr.exe"
@SET WAITEXE="%INTIME%\bin\waitfor.exe"
@SET LOADER="%INTIME%\bin\ldrta.exe"
@SET NODENAME=%1
@SET LDRMODE=%2
@SET WAITCATALOG=%3

if ""%NODENAME%"" == """" (
SET NODENAME="NodeA"
 )

if ""%WAITCATALOG%"" == """" (
SET WAITCATALOG="NT_TASK"
 )

%RTKLOADER% start %NODENAME% %LDRMODE% >"%RTEDGE%\bin\nodemgr.log"
@if %ERRORLEVEL% neq 0 (
pause
 )

:loop
@%WAITEXE% -node %NODENAME% %WAITCATALOG% >nul
@if %ERRORLEVEL% equ 0 (
@goto :loopend
 )

@TIMEOUT /T 1 /NOBREAK >nul
@goto :loop
:loopend
