How To Keep UiPath Waiting Till the Executed Commands finished?

Dears,

How To Keep UiPath Waiting Till the Executed Commands finished without using delay activity, knowing that my used Application is Secure CRT and commands execution may take up to 1h ?

1 Like

May i know what kind of command is been executed
Cheers @hsendel

Hello, with execute commends do you mean the run powershell activity or what do you mean? But if you are running something that displays an element or a image you can use any of this 2 activities:

image
Then just change the timeout to more than 1 hour so it waits.

Hi @hsendel

If we are not sure how much time it will take to complete the execution, I would not recommend to keep the robot waiting or use of any wait activities. If the the task execution completes before the expected timeout period, it will be fine. However, if the timeout period exceeds, the process will run into an error.

So the approach that I’m using in such scenarios is, I would create a controlling workflow and schedule it to run may be every 5 minutes. Each time it runs, it will check whether the executing processes are complete or not. If they are still executing, it will shop the controller. If the execution is complete, then it will proceed with the next steps. This also helps in different other ways by now using resources unnecessarily and by reducing the overhead on the systems by waiting and doing nothing…

1 Like

it’s a script having many commands to be executed one after the other and the whole will take around 30-60min, depends on each node in the network.

Hello guys, do you have any solution for this? I need to wait until a command is completed in Putty ssh before running the next command. Thank you

Hello @Ionut_Frincu, You can use “Get Visible Text” activity, that will represent a word/phrase of your last command printout :
image

Thank you mate! I appreciate! :slight_smile:

1 Like

You’re Welcome, Just make it as solution if it solves your problem. Thanks

@Lahiru.Fernando, how u have done that? can you help me?

1 Like

Hi @sayalic

Sorry I couldn’t understand your question… how I have done what? :slight_smile:

Hi @Lahiru.Fernando,

My problem is I want a bot to wait until the cmd execution gets completed. even if cmd is running in the background. Once the screen disappears or execution complete, I want to proceed further.

So how can we do that?

I have used Wait until vanish activity but it’s not working if cmd window went to background

Hi @sayalic

Sorry for my late reply. Have you tried the activate window activity to get it as the active window so you can use the wait element vanish?