SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Monitoring dos batchfiles

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Monitoring dos batchfiles
Author Message
Martijn de Lange



Joined: 22 Nov 2000
Posts: 6

Post Monitoring dos batchfiles Reply with quote

LS.

For some things I still use the dos commands and/or programs. Wget for example is a dos (unix) program that will let you download anything from the web (http or ftp).

Now I would like to monitor these programs/commands with the scheduler. The scheduler will not send me a message when the job could not be executed. The scheduler just executes the job and it is done. It doesn't monitor the program that will be executed, so when this program failes the scheduler won't update me about this. This can be a verry big problem in some situations when you wan't to count on the scheduler.

I also would like to know what went wrong executing a job or command in a dos-box. For example, when a file is not located on the place where it should be located, wget will not download the file and stops emediatly. 24 x 7 should monitor this and give me a message with detailed information on why wget didn't download anything.

I'm not a programmer, so when somebody can make a script for me and all the others that would like to use this script (a lot I think) that will do the things I asked, I (and the others) will be verry thankfull!

Thank you!

Kind regards,

Martijn de Lange

Tue Dec 19, 2000 6:56 am View user's profile Send private message
Jeremy



Joined: 06 Dec 2000
Posts: 17

Post Re: Monitoring dos batchfiles Reply with quote

It would be great if 24x7 could accept dos errorlevel return codes from programs executed with the run statement. For me to do any flow control based on external programs I have to run a batch file that accepts the errorlevel codes and writes out a file based on what the code was. Then I have 24x7 look for the correct files.

: LS.

: For some things I still use the dos commands and/or programs. Wget for
: example is a dos (unix) program that will let you download anything from
: the web (http or ftp).

: Now I would like to monitor these programs/commands with the scheduler. The
: scheduler will not send me a message when the job could not be executed.
: The scheduler just executes the job and it is done. It doesn't monitor the
: program that will be executed, so when this program failes the scheduler
: won't update me about this. This can be a verry big problem in some
: situations when you wan't to count on the scheduler.

: I also would like to know what went wrong executing a job or command in a
: dos-box. For example, when a file is not located on the place where it
: should be located, wget will not download the file and stops emediatly. 24
: x 7 should monitor this and give me a message with detailed information on
: why wget didn't download anything.

: I'm not a programmer, so when somebody can make a script for me and all the
: others that would like to use this script (a lot I think) that will do the
: things I asked, I (and the others) will be verry thankfull!

: Thank you!

: Kind regards,

: Martijn de Lange

Tue Dec 19, 2000 7:26 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Re: Monitoring dos batchfiles Reply with quote

24x7 includes a template just for the case described in your message.
When creating a new job, click on the "Create from template" link then select "Batch processing" folder and then click "Get process exit code" template. This template will generate a script that will run program synhroniously using RunAndWait statement. The script will also trap a specific exit code but it can be easily changed to trap any code other that non-zero as well as build some "case" logic different for different exit codes.

Note that the exit code for DOS programs matches ERRORLEVEL of the last executed command.

Another good idea is to use output redirection when running DOS program so the output file can be scanned for errors and other specific messages

Here is the example: dir *.txt >> out.list

: LS.

: For some things I still use the dos commands and/or programs. Wget for
: example is a dos (unix) program that will let you download anything from
: the web (http or ftp).

: Now I would like to monitor these programs/commands with the scheduler. The
: scheduler will not send me a message when the job could not be executed.
: The scheduler just executes the job and it is done. It doesn't monitor the
: program that will be executed, so when this program failes the scheduler
: won't update me about this. This can be a verry big problem in some
: situations when you wan't to count on the scheduler.

: I also would like to know what went wrong executing a job or command in a
: dos-box. For example, when a file is not located on the place where it
: should be located, wget will not download the file and stops emediatly. 24
: x 7 should monitor this and give me a message with detailed information on
: why wget didn't download anything.

: I'm not a programmer, so when somebody can make a script for me and all the
: others that would like to use this script (a lot I think) that will do the
: things I asked, I (and the others) will be verry thankfull!

: Thank you!

: Kind regards,

: Martijn de Lange

Tue Dec 19, 2000 9:07 am 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.