24x7 does not consider program return code as a sign of success or error. Many programs return non-zero codes in normal situations. If you want to capture that error code you can run a .BAT file from which you start your program, then you would use ERRORLEVEL variable to put some more logic into that .BAT file so that it can do something to notify 24x7 Something like the following del flag.txt myprogram.exe if ERRORLEVEL = 0 exit dir *.* > flag.txt exit So 24x7 can check for the presense of flag.txt file after it runs this.BAT If the file exists then your program returned non-zero code. : I have a .exe program written in PowerBuilder 7 which I am running using 24x7 : job type 'program or document file'. I am setting an exit code using the : win32 api function ExitProcess in Kernel32.dll. If I return a non-zero : value as the exit code, the job log shows that the job 'finished with : process exit code error: 1 - Incorrect Function'. I have set the job to : run synchronously and to create a semaphore file if a job execution error : occurs. 24x7 does not create the semaphore file. What sort of exit code : does 24x7 need to regard it as an error serious enough to create my : semaphore file? I know I can probably code round this by using 24x7 : script, but if you could give me an answer it would be much appreciated! : I'm using 24x7 version 1.6.3 on NT4 SP6 : TIA
|