cancel
Showing results for 
Search instead for 
Did you mean: 

Stop scheduled process from CLI

AlexanderLinck
Level 2
Running on 6.3.2. I'm attempting to automate the deployment of our releases to the production environment. It would be nice to be able to run a process that will request a stop on the currently running production processes using AutomateC, so that they will restart with the new version. Sadly, I haven't been able to find any way to stop a running process that was not started from the command line, as this requires a session id and the only time you can get the session id is when you start the process from the command line. As these processes are being run by the scheduler, I do not have the session id when I go to stop the process.

Is there a way around this limitation? The ability to stop processes that you didn't personally start using the CLI would be very useful.

------------------------------
Alexander Linck
------------------------------
1 BEST ANSWER

Helpful Answers

I appreciate upgrading might not be a valid option, but version 6.6 has a new command line option, /resourcestatus, which you could use?

/resourcestatus <resourcename> <limit number> <limit type>
- Report sessions for a given resource name, the results can be limited to a specific period
- to list all resources use [All] as the resource name
- by providing a limit number and type (m = minutes, h = hours, d = days, mm = months)
- e.g. /resourcestatus ABC:8181 1 d would return all sessions for the named resource that started in the last day
- Requires user credentials to be supplied via the /user switch

The output is this:

Session ID Status Start Time End Time
7dadb431-360a-41d9-a690-53c88ae82591 Completed 24/07/2019 15:28:33 24/07/2019 15:28:33
82099be0-69ff-4b25-b08d-295837044425 Running 02/10/2019 11:51:37

------------------------------
John Tomkins
Senior Consultant
Blue Prism
Europe/London
------------------------------

View answer in original post

4 REPLIES 4

ewilson
Staff
Staff
Hi Alexander,

There are a couple options I could see here. First, you could automate Blue Prism itself to where you move to Control Room and collect session ID's for actively running processes. Another option would be to run a query against the database to pull session IDs for actively running processes. I believe the table BPASession will contain most of the information you need to determine if a process is running and what its associated session ID is. Finally, there is a capability to interrogate runtime resources to determine if they are running a process and if so what the session ID is. Check the help in Blue Prism Automate for the topic "Resource PC Commands". Specifically, you want to look at the "status" command.

Cheers,
Eric

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Eric,

Thanks for the quick reply. The reason we cannot automate the BP UI is that it would be running on a production machine that people are actively using and we would like to avoid any potential conflicts.
Security policies prevent us from running queries directly against the production database.
I had looked into the Resource PC Commands, but got stuck as each of our processes is running on a separate virtual machine and the examples given in the help menu say nothing about querying remote machines. Also, the workflow seems that it would be complicated to implement dynamically. In any case, I fear that security policies will not allow us to send http requests to our production instances. 

As you can see, our security policies make it difficult to interact with BP from outside of a BP session. I was just wondering if there was some built-in functionality or perhaps a library that could do what we are looking for and, if not, if there is anything coming in a future release.

------------------------------
Alexander Linck
------------------------------

I appreciate upgrading might not be a valid option, but version 6.6 has a new command line option, /resourcestatus, which you could use?

/resourcestatus <resourcename> <limit number> <limit type>
- Report sessions for a given resource name, the results can be limited to a specific period
- to list all resources use [All] as the resource name
- by providing a limit number and type (m = minutes, h = hours, d = days, mm = months)
- e.g. /resourcestatus ABC:8181 1 d would return all sessions for the named resource that started in the last day
- Requires user credentials to be supplied via the /user switch

The output is this:

Session ID Status Start Time End Time
7dadb431-360a-41d9-a690-53c88ae82591 Completed 24/07/2019 15:28:33 24/07/2019 15:28:33
82099be0-69ff-4b25-b08d-295837044425 Running 02/10/2019 11:51:37

------------------------------
John Tomkins
Senior Consultant
Blue Prism
Europe/London
------------------------------

It's good that the ability to do this is on its way. We're working on upgrading to 6.6 and should have it in production by Q1. BP doesn't seem as if it was designed with power-users (ie. software developers) in mind, though to their credit, they appear to be actively working to respond to the needs of this demographic.

------------------------------
Alexander Linck
------------------------------