cancel
Showing results for 
Search instead for 
Did you mean: 

How to put some pause between logout and login with Login Agent on the Scheduler?

TetsujiJunicho
Level 9
I want to run some processes on a single runtime resource. Some processes are executed by the Account a and then others by the Account b. So, I configure the tasks, say, (1)the Account a logs in , (2)execute some processes, and (3)the Account a logs out . Now, the runtime resource gets disconnected for a moment and then re-connected by Login Agent. I want to let (4)the Account b log in after (3)the Account b logs out. When the Account b login task is set after the Account a logout task "completes", it says "ERROR: Invalid Login State : The machine must be logged out to accept a login request". I guess I need to put some pause between logout and login to wait for the machine to get logged out and re-connected. How can I do this?
12 REPLIES 12

TonyPersic
Level 2
For what it's worth, I've configured a schedule with 3 tasks: Login, SomeProcess, Logout, to run every 10 minutes. Under System/Scheduler there are ""resilience"" options tell BP to retry a number of times when a resource is offline. So far the schedule has been running for 5 hours without fail. Can anyone suggest why this is not a suitable alternative to the recommended approach of putting the Login process into a separate schedule?

AmiBarrett
Level 12
You could make your own login process with a delay/wait stage at the end. It wouldn't mark it's self complete and move on to the actual job until it's actually done that way.   @PERSIC - That sounds perfectly reasonable. Moreso than the idea of trying to have multiple schedules. The problem with multiple schedules is threefold. 1) It's too easy for one of these events to be pre-empted by another job that is already running, perhaps due to having a larger workload than intended. 2) It's incompatible with a pooled resource model, unless you can tie in automated webservices or a custom-built replacement controller. 3) It's going to flood your visual schedule, which is prone to crashing Blue Prism (at least in 4x in 5x, I haven't tested in 6x). Rather than have a series of scheduled tasks to login, process, lock/log out, you can also have the worker process call other processes, such as login/log out. This would allow for in-line exception handling, retries and reporting.

TetsujiJunicho
Level 9
Hi We finally got the solution as of version 6.3.1: A new setting has been added to scheduled tasks that adds an optional delay at the end of the task, causing the scheduler to pause before the next task commences. This can be used to allow actions that affect the state of the Runtime Resource (such as Login or Log out) to complete before subsequent actions are performed, and avoid errors such as Command not valid at this time – resource stopping. Hope this will help.