Orchestrator API - Only 2 jobs?

Hi guys,

I’m wondering if anyone knows if it is possible to start more than 2 jobs through the API?

I’m using the /odata/Jobs/UiPath.Server.Configuration.OData.StartJobs POST call in the API to start a certain job/release key. But if one job is running I’m able to add a second job which will get the status “Pending” and that is just fine. But the issue happens when I try to add a third job, then the Orchestrator API just refuses the POST call since 1 job is already in status pending.

The robots already have pending jobs for this Process

Does anyone know how to solve this issue? I would like to have the opportunity to have more jobs in queue or status pending.

I hope you are trying to schedule same process again and again right? @celfa

I’m actually just starting the job directly?

It won’t start the process when one process is running already if you try to trigger by clicking start in studio.

I hope you are trying to run the same process again and again using Orchestrator triggering or API, then that will show you the error you mentioned above. If you try to trigger any other process, then it will be added to the queue in the orchestrator :slight_smile:

Yes I’m using the Orchestrator’s API. And yes I’m starting the same job several times with a few minutes between. I know that other process will just get the status “Pending” until the robot is ready. But I would like to start the same job/release key 3 times. But the third attempt is always refused/blocked.

Here you have clear documentation about that @celfa

    If the same process is scheduled on the same Robot multiple times and their execution time overlaps, only one process is queued, in a pending state. For example, if process A on Robot X is scheduled to run at 11:20, 11:21 and 11:25, the behavior is as follows:

at 11:20 the first process is executed.
If the first execution finishes before the second schedule:
    The second schedule is processed.
        If this execution finishes before the 11:25 schedule, the latter is also executed.
        If the execution of the 11:21 schedule does not finish before the 11:25 one, the latter is added to a queue, in a pending state.
If the first execution does NOT finish before the second schedule:
    The 11:21 schedule is placed in a queue, in a pending state.
        If the execution of the 11:21 schedule finishes before the 11:25 one, the latter is also executed.
        If the execution of the 11:21 schedule starts but does not finish before the 11:25 one, the last schedule is placed in a queue, in a pending state.
        If the 11:21 schedule is still in pending when the 11:25 one should start, the latter is no longer executed or added to a queue and the following message is displayed: The Robots already have pending jobs for this process.
3 Likes

Thank you.

But how to work around it? The user will add the jobs, and sometimes 3 people need the same job with different data to be executed. So if they start these 3 jobs very close to each other one of the jobs will not be executed.

As the users are going to new bots which are different from each other, they will be added to the queue. If they trigger the same bot which is already there in the Orchestrator, then the above issue will occur @celfa

Yes I’m fully aware of that. But in this case there is only allocated 1 bot for this specific job, and the users are starting the job from an external source through the API. So in the current setup only 2 “concurrent” jobs are allowed. But often there will be a need for more jobs in a queue for the same bot - so what to do here?

@celfa

Buy another bot and allocate the bots dynamically. Adding 1 more bot should give you up to 4 jobs queued.

Alternatively, you could examine the feasibility of Attended bots for your process.

Another option, though this depends on your requirements, is rather than queuing a new job with “different data”, you could use “Queues” and feed the data to the Orchestrator Queue(s) and have the bot process the data transactionally. Either one queue if its different data of the same format, or multiple queues (if the data is different format) and have the bot divide its time between the queues - (process 1 trans from Queue1, process 1 trans Queue2 process 1 trans from Queue3 then back to Queue1)

Lastly, is whatever code you’re using to call the start job API, you could check and see if there is currently a 'Pending" job, and then you code can “wait” until there is not a “Pending” job.

I have the same challenge, orc can only handle 2 calls per bot.

my solution , before calling the bot . I have a table queue with status pending and check once the bot is finish and update the status.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.