Is there a way in Orchestrator (or API) to hold or suspend all the pending jobs of a particular unattended robot ? My case is that I want to suspend all the pending jobs of a particular host machine which is running as an Unattended Robot, so that I can then work on some other things on that machine. And after I finish, I can resume those suspended pending jobs.
Thanks for your reply. I know there is license requests api to enable/disable the license, but seems there is no api for suspending the pending jobs. Can you point me to the api so that I can make a test on it ?
To find the JobId (it will be the Id in the response), run a GET request (also you may apply some extra filters) for
https://ORCHESTRATOR_HOSTNAME/odata/Jobs?$filter=((ProcessType eq 'Process' and State eq 'Pending' and Machine/Name eq 'MACHINE_TEMPLATE_NAME'))&$top=1000&$expand=Robot,Machine,Release&$orderby=CreationTime desc
Thanks for your instruction, the 2 API seems to resemble the Stop and Kill functions in Orchestrator. Stop and Kill will terminate the job in a pre-mature way, but not wait until the job finish. What is preferred:
suspend all pending jobs
wait until the current executing job to finish (Stop if a built-in activity exist in the workflow, or Kill if over a certain period of time)
no pending jobs will be executed, and the robot machine is free for some other non RPA works
work on something else on the robot machine
resume all pending jobs when the robot machine is ready
In this case, no job is affected and we don’t need to worry if there is any jobs missed execution.
I think what you what to achieve is not achievable as you want.
Pending - A job is in this state if it is queued on the same Robot or it is trying to establish a connection with the Robot (only different jobs on the same Robot can be queued).
Either you wait until the pending job is running and wait for its finish status, or you Stop/Kill and then retry the job after the machine is ready.
Appreciate your answer. Just wonder if there is way to disconnect the robot (from Orchestrator) so that it will not pick up any pending jobs, and is then free for some other tasks. From Orchestrator, I can delete the robot, but if it is running a job, it cannot be deleted (which is good); but then if it picks up another pending job right after the previous job is finished, I can never delete this robot.