I'm using a batch script that executes a journal.
How can I steer the return codes for run_journal.exe from within my journal?
this way i can detect if my journal has run succesfully. Also if i catch an exception in the journal, I want to control the error handling in my Batch script.
Solved! Go to Solution.
Before you launch your journal with run_journal, set this environment variable:
Note that the folder must already exist!
Then set this one:
That one will force NX to retain the log file that it generates while running your Journal. It should show up in the folder you pointed to with UGII_TMP_DIR, and the extension should be ".syslog".
The log should contain information about anything that went wrong, and I think it should let you see whether the Journal executed successfully.
Your input gave me an other/simular idea.
I added an extra argument to the run_journal commandline. The argument specifies an errorlog-file.
When the journal is complete there are 2 posibilities in the batch file:
- The errorlog does not exist == All is OK
- The errorlog exists == send the logfile by email to the user by VBScript