Hi all, I have encounter a big problem of running a unattended robot written in UiPath.
My process first will run a macro stored in a shared drive, which is connected by VPN, and may have random time of connection duration.
Sometimes if the VPN is down during the process running time, the RPA will pops out the error. If only the RPA is down that’s not a big deal, but it will also affect other process running on the same desktop, making them stop working somehow.
Every time I will have to run those process for about a few hours during office hour which is very disturbing.
Is there any method to keep the error from only affect the the RPA itself instead of affecting all process in the same environment? Given that the RPA has to be run in the same environment as the processes.
I’m not very much clear of the process but try these two possible solutions.
- Try-Catch Blocks: Wrap your activities that rely on the VPN connection within Try-Catch blocks. This will allow the workflow to catch errors and handle them gracefully without crashing.
Try
// Your activities that require VPN connection
Catch
// Handle the error (e.g., log the error, send a notification, retry the connection)
End Try
- Retry Scope: Use the Retry Scope activity to retry specific activities if they fail. This is useful for handling intermittent VPN connectivity issues.
Retry Scope
Action:
// Your activities that require VPN connection
Condition:
// Condition to check if the VPN is connected
NumberOfRetries: 3
RetryInterval: "00:00:10" // 10 seconds interval
Thanks,
Aahok ![]()
Welcome to the community
Can you please elaborate on the issue…show some screenshots of the issue or so …as the issue is little unclear
Cheers
Requesting you to please elaborate the issue
Thank you for your solution, I just tried wrap the whole process within a retry scope inside try catch. I will see if the other processes will be affected.
The RPA is running on a desktop computer, will a few more Excel macros running on certain time (usually off office hour).
The VPN will disconnect once a few hours (very random, usually 8 hours or less).
The VPN is used to access files required by the scheduled macros, and most of the macro are scheduled in windows scheduler.
My RPA will first run a macro stored in the shared drive. The problem is if the VPN is disconnected during the RPA runtime, UiPath will pop out an error message, and keeps the process from running. It is not a big deal if it happened on weekdays, since I can just close the error message and terminate the whole process manually.
The big problem is when I am on vacation, if the process gets an error, it won’t stop and keeps running for the whole weekend / my whole vacation time.
Other process somehow also crashes if this happened, like the files can be opened but the macro running will usually be crashed which makes most of the important files not updated during the weekend time.
I would like to ask for a method which can minimize the impact of the RPA crashes so that it won’t affect other macros running.
I prefer the RPA could be totally terminated automatically and the error message will not show up if the RPA crashes at any point.
I believe you are running using invoke macro…better to include error handling in your macros so that when it fails it wont give pop up and the control comes back to rpa…while macro is runnign from rpa if the control does not come back then the bot would stuck…best way is to use on error and goto and let macro fail
Hope this helps
cheers
If you start your process from the Orchestrator via triggers, you could also set a time limit so that the process is killed if it hasn’t finished. It will prevent the job from being stuck forever and blocking other jobs.

I think this is what I want, the robot execution is not ended even I have added retry and try catch block. But the whole execution ended at the time duration I set.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.