how to run batch scripts
how to run batch scripts
Hi,
I have a batch file which contains Oracle database scripts. I want to run this batch file once a day and email the spool results of the file. How should I configure host monitor to run batch files?
Thanks.
I have a batch file which contains Oracle database scripts. I want to run this batch file once a day and email the spool results of the file. How should I configure host monitor to run batch files?
Thanks.
To run some test once a day you should create "Schedule" that allows test execution between 7:00 and 7:10 (for example) and set test interval longer than 10 min (7:10-7:00=10 min), e.g. 11 min.
http://www.ks-soft.net/hostmon.eng/mfra ... #Schedules
Then assign this schedule to the test
If you want to execute some script, use "External" or "Shell Script" test method
Regards
Alex
http://www.ks-soft.net/hostmon.eng/mfra ... #Schedules
Then assign this schedule to the test
If you want to execute some script, use "External" or "Shell Script" test method
Regards
Alex
After receiving your reply I tried configuring my .bat file as a script by the following steps:
test->new->shell script test->script manager
scripts->new
entered name of script as dailychecks
start cmd: path\filename.bat
let's try -> tested and it worked fine
added this to a schedule for every 10 mins and i have setup the test to email me whether the results are good/bad and so i am expecting email every 10 mins. But I am not. Also when I check in the test list I see the following
testname status recurrences reply
dailychecks_shellscript Unknown 3 Error: Invalid result (c:\program files\hostmonitor4>exit
What does this mean and I also need some help with why I am not getting alerts every 10 mins as per my schedule.
Please help.
test->new->shell script test->script manager
scripts->new
entered name of script as dailychecks
start cmd: path\filename.bat
let's try -> tested and it worked fine
added this to a schedule for every 10 mins and i have setup the test to email me whether the results are good/bad and so i am expecting email every 10 mins. But I am not. Also when I check in the test list I see the following
testname status recurrences reply
dailychecks_shellscript Unknown 3 Error: Invalid result (c:\program files\hostmonitor4>exit
What does this mean and I also need some help with why I am not getting alerts every 10 mins as per my schedule.
Please help.
What information is returned by script?Unknown 3 Error: Invalid result (c:\program files\hostmonitor4>exit
There are special rules that must be obeyed when creating a shell script.
www.ks-soft.net/hostmon.eng/mframe.htm# ... m#shellres
If script returned correct result when you have used "Test" button (Script Manager dialog) but doesn't work now, probably you have used different parameters for the test?
If you script returns result using exit code, setup "External" test method instead of "Shell Script".
What parameters do you use for this action?and I also need some help with why I am not getting alerts every 10 mins as per my schedule
- Start when?
- Repeat?
- Time restriction?
Regards
Alex
Could you please provide example of the result?results that should be displayed
You may send a file to support@ks-soft.netI have executed the command and I want to send you an attachement. How do I do that
On the other hand I need just several text lines, you may copy&paste result right here
Regards
Alex
Vidyagana,
2 months ago I refereed you to the manual.
There are special rules that must be obeyed when you create a shell script.
www.ks-soft.net/hostmon.eng/mframe.htm# ... m#shellres
Your script does not follow these rules.
"JServer Release 9.2.0.1.0 – Production" is not valid result if you want to use Shell Script test method.
It means you should modify your script or use some other test method. E.g. External
http://www.ks-soft.net/hostmon.eng/mfra ... m#execheck
Regards
Alex
2 months ago I refereed you to the manual.
My today's answer the sameThere are special rules that must be obeyed when creating a shell script.
www.ks-soft.net/hostmon.eng/mframe.htm# ... m#shellres
There are special rules that must be obeyed when you create a shell script.
www.ks-soft.net/hostmon.eng/mframe.htm# ... m#shellres
Your script does not follow these rules.
"JServer Release 9.2.0.1.0 – Production" is not valid result if you want to use Shell Script test method.
It means you should modify your script or use some other test method. E.g. External
http://www.ks-soft.net/hostmon.eng/mfra ... m#execheck
Regards
Alex