View previous topic :: View next topic |
Author |
Message |
cichockia
Joined: 19 Sep 2014 Posts: 36
|
Posted: Wed Mar 29, 2017 5:00 am Post subject: Does it matter the order of the actions to execute them ? |
|
|
I prepared the test.
If it's OK then do nothing
If it is BAD to do the action:
1. first prepare a report from the database
2. send the report as an attachment by email
Unfortunately the mail does not contain an attachment only for information on the lack of file availability.
It looks like action 1 and 2 were done simultaneously
How to solve such a problem ? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12792 Location: USA
|
Posted: Wed Mar 29, 2017 5:20 am Post subject: |
|
|
If you are using the same "start conditions" for both actions then action created 1st will be started 1st.
HostMonitor waits for "generate reports" action so if you added this action before "send e-mail" action, everything should work fine.
HostMonitor version?
May we see settings?
Regards
Alex |
|
Back to top |
|
|
cichockia
Joined: 19 Sep 2014 Posts: 36
|
Posted: Wed Mar 29, 2017 8:10 am Post subject: |
|
|
Hello,
Hostmonitor 10.54
If I run the test for the first time (the report has not yet generated) then the mail does not contain the report.
If the next time I run the test the mail contains the report but from the previous execution of the test
Actions added to the action profile have identical parameters.
Action 1 and 2:
Condition: standard mode
start when: 1
Repeat: -1
I do not know how to attach a configuration file. |
|
Back to top |
|
|
cichockia
Joined: 19 Sep 2014 Posts: 36
|
Posted: Wed Mar 29, 2017 8:28 am Post subject: |
|
|
Hello,
Supplement:
The first action is: Execute external program
The second action is: Send eMail |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12792 Location: USA
|
Posted: Wed Mar 29, 2017 4:01 pm Post subject: |
|
|
So you are using "Execute external program" action, not "Generate reports" action?
Then both actions executed simultaneously.
If you need to wait for external program results, use HM Script action instead and ExecuteProgram command
http://www.ks-soft.net/hostmon.eng/mframe.htm#actions.htm#actScript
or use "External" test item to start your software and assign "Send e-mail" action to the test...
Regards
Alex |
|
Back to top |
|
|
cichockia
Joined: 19 Sep 2014 Posts: 36
|
Posted: Fri Mar 31, 2017 7:16 am Post subject: |
|
|
Hello,
or use "External" test item to start your software and assign "Send e-mail" action to the test...
This is the solution I am currently using.
I wish that the triggered actions do not wait for the end of the previous action "Execute external program".
... Or there is no parameter specifying in action properties:
- wait for the end of the previous action
- Perform in parallel with the previous one.
Regards
Artur |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12792 Location: USA
|
Posted: Fri Mar 31, 2017 7:54 am Post subject: |
|
|
Quote: | I wish that the triggered actions do not wait for the end of the previous action "Execute external program". |
That's how "Execute external program" works, it does not wait for external program.
But you said you need reports, so you need action that waits for results. I am confused now.
Quote: | wait for the end of the previous action |
Use HM Script for this.
As I said - If you need to wait for external program results, use HM Script action instead (ExecuteProgram command)
http://www.ks-soft.net/hostmon.eng/mframe.htm#actions.htm#actScript
Quote: | ... Or there is no parameter specifying in action properties:
- wait for the end of the previous action
- Perform in parallel with the previous one. |
HM Script action offers both options - there are StartProgram and ExecuteProgram command (1st does not wait for external program, 2nd waits)
Regards
Alex |
|
Back to top |
|
|
|