SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Command Line Return Code

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Command Line Return Code
Author Message
John Natale



Joined: 13 Sep 2000
Posts: 107

Post Command Line Return Code Reply with quote

Hello,

I'm running a 24x7 job from the command line
example: 24x7 /JOB 6

Question: Is there away to have the job return
a specific error code? If I check the ErrorLevel
it is always showing a 3

Example:

C:\> 24x7 /JOB 6

C:\> echo %ERRORLEVEL%
3

C:\>

Thanks

Tue Dec 20, 2005 12:25 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Command Line Return Code Reply with quote

The solution depends on job type. If this is a JAL script type job you can, for example,

Call "kernel32.dll", "ExitProcess", "u", False, 5

Here, 5 is your exit code.

Let me know which job type you run if you need a different solution

: Hello,

: I'm running a 24x7 job from the command line
: example: 24x7 /JOB 6

: Question: Is there away to have the job return
: a specific error code? If I check the ErrorLevel
: it is always showing a 3

: Example: C:\> 24x7 /JOB 6

: C:\> echo %ERRORLEVEL%
: 3

: C:\>

: Thanks

Tue Dec 20, 2005 2:59 pm View user's profile Send private message
John Natale



Joined: 13 Sep 2000
Posts: 107

Post Re: Command Line Return Code Reply with quote

Thank you, It was a JAL script so that worked fine.

Just out of curiosity how would it be different for
the different job types?

Personally I've only used JAL and VBScript.
I have not created any Run exe/SQL jobs.

Thanks

Tue Dec 20, 2005 3:18 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Command Line Return Code Reply with quote

"Call" is a JAL command. In VBScript you would need to use some COM component or 24x7 extension for VB or VB-to-JAL cross-language call. In batch jobs you can call the KillProcess utility or something similar to kill the entire tree and pass back some exit code. The most difficult part is database scripts, Something more complicated would be needed in that case

: Thank you, It was a JAL script so that worked fine.

: Just out of curiosity how would it be different for
: the different job types?

: Personally I've only used JAL and VBScript.
: I have not created any Run exe/SQL jobs.

: Thanks

Tue Dec 20, 2005 3:29 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.