SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
problem with Exit Code evaluation

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
problem with Exit Code evaluation
Author Message
Vince Sefcik



Joined: 22 Nov 2002
Posts: 4

Post problem with Exit Code evaluation Reply with quote

I have a series of jobs that are configured
as "Run program or document file". Each job executes
a VB.NET program that runs some SQL scripts. The
VB.NET program sets a return code equal to the number
of records processed. I have each job configured
with "successful exit code" as "0-1000" and to send an
e-mail message if the job ends with an error. If the
job returns a return code of, say, 148, the Job Log
contains the messages:
Process finished with exit code 148.
Process exit code does not satisfy exit code condition.
Error message sent.

And I get an e-mail message indicating the job failed.

So, why is the error message being sent if I've listed
the successful exit code as "0-1000" and the log says
the exit code was 148?

Wed Jan 04, 2006 1:02 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: problem with Exit Code evaluation Reply with quote

Try 0 - 1000 instead of 0-1000

: I have a series of jobs that are configured
: as "Run program or document file". Each job executes
: a VB.NET program that runs some SQL scripts. The
: VB.NET program sets a return code equal to the number
: of records processed. I have each job configured
: with "successful exit code" as "0-1000" and to send an
: e-mail message if the job ends with an error. If the
: job returns a return code of, say, 148, the Job Log
: contains the messages: Process finished with exit code 148.
: Process exit code does not satisfy exit code condition.
: Error message sent.

: And I get an e-mail message indicating the job failed.

: So, why is the error message being sent if I've listed
: the successful exit code as "0-1000" and the log says
: the exit code was 148?

Wed Jan 04, 2006 1:15 pm View user's profile Send private message
Vince Sefcik



Joined: 22 Nov 2002
Posts: 4

Post Re: problem with Exit Code evaluation Reply with quote

: Try 0 - 1000 instead of 0-1000
I tried that and if I type a blank prior to and
following the hyphen, the blanks are removed as
soon as I click on the Next button.

Wed Jan 04, 2006 1:24 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: problem with Exit Code evaluation Reply with quote

Also try setting "ignore execution errors" option in step 9.

: I tried that and if I type a blank prior to and
: following the hyphen, the blanks are removed as
: soon as I click on the Next button.

Wed Jan 04, 2006 1:45 pm View user's profile Send private message
Vince Sefcik



Joined: 22 Nov 2002
Posts: 4

Post Re: problem with Exit Code evaluation Reply with quote

: Also try setting "ignore execution errors" option in step 9.
I tried that and it had no effect. I still get the
messages in the log:
Process finished with exit code 148.
Process exit code does not satisfy exit code condition.

Wed Jan 04, 2006 1:51 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: problem with Exit Code evaluation Reply with quote

If you clear the exit code condition then you will only get a warning in the log and no email will be sent.

If you want to log the exit code as an info message stating number of records you can do change the job type to script and through the script run the process and then analyze the exit code. For example, if you choose JAL as a the job scripting language you can do something like the following

OnErrorResumeNext
Dim proc_id, number
Dim exit_code, number
RunAndWait "my program", "", 0, proc_id
ProcessGetExitCode exit_code

Dim log_message, string
Dim handle_errors, boolean
isLess exit_code, 0, handle_errors
If handle_errors, ERROR_HANDLER
isGreater exit_code, 1000, handle_errors
If handle_errors, ERROR_HANDLER

ConcatEx "Job processed ", exit_code, " records", log_message
LogAddMessageEx, @V"job_id", "@V"job_name"", "INFO", log_message
Exit

ERROR_HANDLER:
ConcatEx "Job error #", exit_code, log_message
LogAddMessageEx, @V"job_id", "@V"job_name"", "ERROR", log_message

Similar thing can be done using VBSCript job

: I tried that and it had no effect. I still get the
: messages in the log: Process finished with exit code 148.
: Process exit code does not satisfy exit code condition.

Wed Jan 04, 2006 3:07 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.