Errorlevel not working

Tried to use error level 98 for checking whether an instance of pslcmd is running, and then pause and try again. Starting the 1st build and it runs normally. Starting a 2nd one a few minutes later and it pauses and retries ... but it does so forever, even after the 1st build ended. Attached is a snippet of the batch file.

Is there some logical error in it? Does it not work this way? What do I have to do to achieve my goal to let a PSL job wait until another one is finished.

BTW: "sleep.exe" is a little tool that I use because built-in timeout doesn't work in Jenkins scripts.

TIA, Franz-Josef

================================================

::
:: Projekt aktualisieren und Zieldateien generieren
::

:GENERATE

"C:\Program Files (x86)\SDL\SDL Passolo\SDL Passolo 2018\pslcmd.exe" /script:viv-l10n-%ACAD%-%BUILD_NR%-simulate.script

IF ERRORLEVEL 98 (
GOTO WAIT
) ELSE (
GOTO COPY
)

:WAIT
sleep 60
GOTO GENERATE

:COPY

::
:: Sprachdateien in Netzwerkordner kopieren
::

SET TARGET_DIR=\\FILE-SRV01\Austausch\TRANS.EXT\TFS\Sprache\VESTRA INFRAVISION\%BUILD_NR%\AutoCAD\ProgramFiles\CAD_PROG\en
SET TARGET_DIR_x86=\\FILE-SRV01\Austausch\TRANS.EXT\TFS\Sprache\VESTRA INFRAVISION\%BUILD_NR%\AutoCAD\ProgramFiles\CAD_PROG (x86)\en

xcopy ProgramFiles\CAD_PROG\en\*.lng "%TARGET_DIR%" /Y
xcopy ProgramFiles\CAD_PROG\en\*.dll "%TARGET_DIR%" /Y
xcopy "ProgramFiles\CAD_PROG (x86)\en\*.lng" "%TARGET_DIR_x86%" /Y
xcopy "ProgramFiles\CAD_PROG (x86)\en\*.dll" "%TARGET_DIR_x86%" /Y

Parents
  • Hi Franz-Josef,

    Depending on how much batch work you do, you might want to consider an automation-service on you laptop such as Jenkins (https://www.jenkins.io/). It uses the concept of a build queue which can contain separate jobs like your batch jobs. Not only does it allow you to sequence the jobs, perhaps using a timer, it also keeps logs of the job output for future reference. 

    So in your example, you can configure job 1 to automatically start job 2 once it finishes.

    It's pretty easy to set up and very powerful. I use it a lot for my Passolo automation.

    Best Regards

    Mark

Reply
  • Hi Franz-Josef,

    Depending on how much batch work you do, you might want to consider an automation-service on you laptop such as Jenkins (https://www.jenkins.io/). It uses the concept of a build queue which can contain separate jobs like your batch jobs. Not only does it allow you to sequence the jobs, perhaps using a timer, it also keeps logs of the job output for future reference. 

    So in your example, you can configure job 1 to automatically start job 2 once it finishes.

    It's pretty easy to set up and very powerful. I use it a lot for my Passolo automation.

    Best Regards

    Mark

Children