Hello, I run batch script that call another batch script. Another batch script should run for several hours to verify if there are any DB connections
and after several hours if connections persist should kill the connections and go back to original batch script. Second script is simple loop that repeats itself every minute. Problem is that if there are no connection script is running normally, but if it has to wait, script well both both ends. Script is running as persecution script of backup program and backup colleagues has told me that reason is Exit code = 255. I setup some logging inside a script, and when returns back to “check” after 1h it return with error 255.
First script : :waitforProcess call "%backupDir%\waitprocessRun.bat" %AdminName% %AdminPwd% if errorlevel 0 goto shutdownDirect if errorlevel 1 goto shutdown
second script :check call Check4Sessions %AdminName% %AdminPwd% if errorlevel 1 goto checkAgain if errorlevel 0 goto exitOK goto exit
:checkAgain ping -n 60 127.0.0.1 >nul set counterMin=%counterMin%m %eventInf% /D "Witing for %counterMin% %counterQuart%" if "%counterMin%"=="%maxMin%" goto minFull
:continueCheck if "%counterQuart%"=="%maxQuart%" goto exitError goto check
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.