Running batch file terminated after 1h, with exit code 255 “no record log” RRS feed

  • General discussion

  • 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 : 
    call "%backupDir%\waitprocessRun.bat" %AdminName% %AdminPwd%
    if errorlevel 0 goto shutdownDirect
    if errorlevel 1 goto shutdown

    second script 
    call Check4Sessions %AdminName% %AdminPwd% 
    if errorlevel 1 goto checkAgain
    if errorlevel 0 goto exitOK
    goto exit

    ping -n 60 >nul
    set counterMin=%counterMin%m
    %eventInf% /D "Witing for %counterMin% %counterQuart%"
    if "%counterMin%"=="%maxMin%" goto minFull

    if "%counterQuart%"=="%maxQuart%" goto exitError
    goto check

    • Changed type Bill_Stewart Friday, April 28, 2017 8:03 PM
    • Moved by Bill_Stewart Friday, April 28, 2017 8:03 PM Unanswerable drive-by question
    Friday, March 17, 2017 6:24 PM

All replies

  • What's your question?

    In any case, we would recommend using PowerShell rather than cmd.exe shell script (batch).

    -- Bill Stewart [Bill_Stewart]

    Friday, March 17, 2017 6:39 PM
  • D:\scripts> net helpmsg 255

    The extended attributes are inconsistent.


    Friday, March 17, 2017 8:23 PM