Question

Check for failure on nightly batch jobs

  • 9 August 2022
  • 1 reply
  • 4 views

Badge

I have a batch file which runs a WB nightly. It also write a log file which is great. But is there a "universal" way to control that the workbench ran successfully? Or do I have to make a script to scan the log file for key words? What key words would that be?

Hopefully there is a better way?


1 reply

Userlevel 4
Badge +26

In your batch you should be able to test the exit code directly after the run.

https://www.shellhacks.com/windows-get-exit-code-errorlevel-cmd-powershell/#:~:text=Every%20command%20or%20application%20returns,interpreted%20as%20an%20error%20code.

Reply