I am going to deploy the automation in a server and it should be run through task scheduler. The problem is when I am connected in the remote desktop, the automation runs as expected, however, when I am not connected in the remote desktop, automation gets stuck.
@LizetteL When you disconnect from an RDP session, your screen will lock. If the application that you are automating behaves differently when you lock your screen, then your automation will too. I have seen applications that know when the machine is locked and do not create all of the same controls (since they are designed to be used by people and thus shouldn’t work when locked). That may be your issue. You also might be doing things like SendKeys, Focus, or OCR that obviously wouldn’t work on a locked system.
If you use Pega Robot Manager and the Pega RPA Service to run your bots, they will log your bot in at the appropriate time and at least initially, your bot will be unlocked. You can work with your security team to remove any lock timeouts for your bots or use scripts or other methods to prevent it from locking due to inactivity. This would be the best way to hanbdle this rather than manually logging-in and using Task Scheduler.
If you are not using Pega Robot Manager and wish to run a standalone bot on a machine that you are logging-in to manually, I believe there’s a command you can use to disconnect an RDP session without locking the workstation. You’d have to search for that however, as I am not sure what that is as I’ve only heard it second-hand.