To have some "if" or "case" logic you have to create a script type job. This is really simple. Example job script: Dim my_process, number Dim exit_code, number RunAndWait "my_program.bat", "", 0, my_process ProcessGetExitCode exit_code ChooseCase exit_code, END Case 0 // success, nothing to do Case 1 // error #1, send me email MailSend ..... Case 2 // error #2, run fix it batch Run "fix_it.bat", "", my_process Case 3 // error #3, run fix it job JobRun "Fix It Job" CaseElse // unknown error, log it and email me LoggAddMessageEx "ERROR", @V"job_id", "@V"job_name"", "Unknown error detected" END: : I have a process that I would like to run as a Program Type Job. I understand : how to set up the job to check for Exit Codes and generate a semaphore : file if there is a non-successful exit code. However, is there any way for : me to pass the actual exit code to another process using the semaphore : file. For example, can I write the exit code to the file, or use the exit : code in part of the semaphore's filename? : The problem I am trying to solve is that different actions are required : depending on what value the exit code is. : Thanks : Greig
|