Actions execution order

Need new test, action, option? Post request here.
Post Reply
Arun

Actions execution order

Post by Arun »

Hi Alex,

I am trying to execute an action profile with 2 actions in it. An 'execute external program' and 'execute hms script'. I want to execute an external program first and then the hms script. But HMS script action gets executed first no matter what.

How do I define/prioritize the execution order?

Thanks,
Arun
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

How do I define/prioritize the execution order?
If 2 actions have the same "start when" settings, they will be executed in creation order.
Please note: "Execute external program" action does not wait until application finish work, HostMonitor just launch application.
If you want to wait for some results, solution is simple - launch program from the HM Script (use ExecuteProgram command)

Regards
Alex
Arun

Post by Arun »

Basically the requirement is like this. I have a situation where I have to set a particular filename as an UDV. But the application which generates this file keeps changing the filename each time. So, an external program reads the filename and creates an HMScript with following

SetUserVariable <variable> <filename>
SaveUserVariables
LoadUserVariables

Hence, I have to execute this program first and then run the HMscript later. As per your suggestion, can I define a HMScript file which executes the utility and run the other HMscript from within ?

Highly appreciate.
Regards,
Arun
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

As per your suggestion, can I define a HMScript file which executes the utility and run the other HMscript from within?
No, but you can use 2 actions:
1st action (this action should be created 1st!): start HM Script with single command "ExecuteProgram 10000 path_to_the_program"
2nd action: start HM Script generated by the program

Regards
Alex
Arun

Post by Arun »

Alex.. Thanks.. It worked.. :)
Post Reply