Posted: 2 Mar 2020 14:38 EST Last activity: 9 Mar 2020 11:31 EDT
Restarting Runtime Instance
Is it possible to have a runtime instance "restart itself" in case a certain number of errors occur? We have a couple of automations that occasionally run into issues that can only be fixed by manually restarting the runtime instance, so i am curious if this can be done automatically.
Is this RPA or RDA (unattended or attended)? Are you using the RPA Service with Robot Manager? If so, you can simply call TerminateRuntime from within the bot code (before that you should also set one of the adapters to AdapterNotReady so that work is not sent over). If the bot is scheduled to be active, then the RPA service would simply start it back up again. That is the easiest way.
Another way would be to launch a batch file with commands that would terminate and then launch Runtime after a set amount of time. I could create an example if you need one, but that would have to be later in the week.
It's an RPA unattended solution. We do utilize Bot Manager slightly, but all we really use it for is to see if bots are online or if the queue is being worked or not, so i'm not sure if we're using it to the fullest extent. So where in Robotic Studio would you find TerminateRuntime? And how would you even go about setting up an RPA service to start Runtime back up again? That's definitely not a function we're utilizing or that i was even aware of.
TerminateRuntime should be a method available in your Toolbox under the Runtime section. If you do not see it, you can add it to your Toolbox by resetting it (as it is there stock), or you can add it by right-clicking on the Toolbox and selecting Choose Toolbox items. The attached screenshot shows where to find it in the OpenSpan.Runtime.Core.dll.
Below is an article on the RPA service. It is installed with Runtime as an option during installation. You need to configure the credentials it will use to login to the machine.