Execute and Wait
Execute and Wait
Hi,
i have a test that countains 2 actions.
at first it run a script that create a file, this file are addet as attachment into thr second sendmail-action.
its able to run the first action and wait util this script are finished befor HM is beginning the second action?
i have a test that countains 2 actions.
at first it run a script that create a file, this file are addet as attachment into thr second sendmail-action.
its able to run the first action and wait util this script are finished befor HM is beginning the second action?
Re: Execute and Wait
Maybe you can send the mail after the second consecutive bad result?Heini_net wrote:Hi,
i have a test that countains 2 actions.
at first it run a script that create a file, this file are addet as attachment into thr second sendmail-action.
its able to run the first action and wait util this script are finished befor HM is beginning the second action?
(see start action --> start when)
Or you generate the mail via script?
Regards,
Martin
I have provided solution when you asked how to "add result of an app to Mail Action"its able to run the first action and wait util this script are finished befor HM is beginning the second action
http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=4902
You should use HM Script action with ExecuteProgram HMScript command to start your script and wait for results.
http://www.ks-soft.net/hostmon.eng/mfra ... #actScript
Regards
Alex
Hi,
can i use params in the HMS file too ?
for example i'm running this script:
C:\WINDOWS\system32\wscript.exe C:\HM-Konfiguration\cpuprocess.vbs "c:\TEMP\%TestID%-Process.txt" "%HostAddr%"
the first param create a file name based on the thest id but i cant get anny error messages and this script does not create a file. but if i'm using this command for action "execute external app" so it works.
can i use params in the HMS file too ?
for example i'm running this script:
C:\WINDOWS\system32\wscript.exe C:\HM-Konfiguration\cpuprocess.vbs "c:\TEMP\%TestID%-Process.txt" "%HostAddr%"
the first param create a file name based on the thest id but i cant get anny error messages and this script does not create a file. but if i'm using this command for action "execute external app" so it works.
Yes.can i use params in the HMS file too ?
Please read the manual: http://www.ks-soft.net/hostmon.eng/mfra ... acroparams
Where is ExecuteProgram command?for example i'm running this script:
C:\WINDOWS\system32\wscript.exe C:\HM-Konfiguration\cpuprocess.vbs "c:\TEMP\%TestID%-Process.txt" "%HostAddr%"
Regards
Alex
i have created a new test with the "run hms script"-actionKS-Soft wrote:Yes.can i use params in the HMS file too ?
Please read the manual: http://www.ks-soft.net/hostmon.eng/mfra ... acroparams
Where is ExecuteProgram command?for example i'm running this script:
C:\WINDOWS\system32\wscript.exe C:\HM-Konfiguration\cpuprocess.vbs "c:\TEMP\%TestID%-Process.txt" "%HostAddr%"
Regards
Alex
the ExeCuteProgramm Command contain this:
C:\WINDOWS\system32\wscript.exe C:\HM-Konfiguration\cpuprocess.vbs "c:\TEMP\%TestID%-Process.txt" "%HostAddr%"
1) May I see entire HMScript?
2) You may check action result using system log or Quick Log.
What do you see in Quick Log?
http://www.ks-soft.net/hostmon.eng/mfra ... ickLogPane
Note 1: Quick Log may work in 3 different modes:
- Show test results
- Show actions
- Show test results and actions
Note 2: If you select specific test in Test Details pane, HostMonitor will display latest actions triggered by this test only.
3) I would recommend to use /B command line parameter for wscript.exe
Regards
Alex
2) You may check action result using system log or Quick Log.
What do you see in Quick Log?
http://www.ks-soft.net/hostmon.eng/mfra ... ickLogPane
Note 1: Quick Log may work in 3 different modes:
- Show test results
- Show actions
- Show test results and actions
Note 2: If you select specific test in Test Details pane, HostMonitor will display latest actions triggered by this test only.
3) I would recommend to use /B command line parameter for wscript.exe
Regards
Alex
hi,
i have found the reason for this.
i 'm using a vbs script with wscript.sleep. but this does not work. hm receive only a error but i dont know whats the error message. it called only "error(s) detectet" but if i run the hms script manually so i dont receive any error messages.
so hm dont wait until the "run external app" return and start the next action. and the next action are faster than the first action who create the file.
i have found the reason for this.
i 'm using a vbs script with wscript.sleep. but this does not work. hm receive only a error but i dont know whats the error message. it called only "error(s) detectet" but if i run the hms script manually so i dont receive any error messages.

so hm dont wait until the "run external app" return and start the next action. and the next action are faster than the first action who create the file.
1) Have you added /B (batch mode) parameter?
2) I would recommend to use cscript.exe instead of wscript.exe
3) If you see some error then please explain where do you see this error. If you see "error(s) detected" message in HostMonitor's log, please provide exact log record. I think message should provide more details. Isn't it?
I assume this error reported by "Execute HMScript" action? Am I right?
Then we return to the same point - may I see your script? I asked this several times.
How I can help you to find the problem if you do not provide any details??
Regards
Alex
2) I would recommend to use cscript.exe instead of wscript.exe
3) If you see some error then please explain where do you see this error. If you see "error(s) detected" message in HostMonitor's log, please provide exact log record. I think message should provide more details. Isn't it?
I assume this error reported by "Execute HMScript" action? Am I right?
Then we return to the same point - may I see your script? I asked this several times.
How I can help you to find the problem if you do not provide any details??
Regards
Alex