How can I start a job from the orchestrator API using the trigger id

Hello colleagues, currently I have managed to execute several of my automated processes through the orchestrator api, I do it by obtaining the process id and executing the Jobs/UiPath.Server.Configuration.OData.StartJobs script, but when I launch my processes In this mode, the time limits that I have configured in the triggers are not taken into account, that is, if I launch a process that in my trigger has an execution limit of 2 hours, it is possible that the process takes longer and the orchestrator does not stop the process. process, how can I solve this?

@Juan_Esteban_Valencia

Once go through this :slightly_smiling_face:

If you’re using the Orchestrator API to start jobs and your processes are not adhering to the time limits you’ve configured in the triggers, it’s need to understand toy how to ensure that the processes respect these limits.

1.When starting jobs through the API, ensure that you are setting the job’s priority and constraints correctly. Specifically, you need to set the startProcess input parameter to true and set the constraints, including the executionSettings, to align with your trigger configuration.

2.Check that the trigger you’ve set for your process in Orchestrator has the desired time limits correctly configured. These limits are used to control the job’s execution duration.

3.Make sure that the process in Orchestrator is linked to the trigger with the desired time limits. Ensure that you are using the correct trigger and that it is active.
4.After starting a job through the API, monitor the job’s execution time. You can query the Orchestrator API to get the job status and execution time. If the job exceeds the time limits, you might want to handle the situation programmatically.
5.If a job exceeds its time limit and Orchestrator doesn’t automatically stop it, you can use the API to stop the job manually. You can call the Jobs/UiPath.Server.Configuration.OData.StopJob endpoint with the job’s ID to terminate it.

@Juan_Esteban_Valencia

Hi

When you trigger a process using the Orchestrator API, it might not respect the execution time limits configured in the triggers because the API execution doesn’t necessarily enforce these limits

And UiPath Orchestrator doesn’t support passing a “timelimit” parameter directly through a URL for job execution. The recommended and proper way to handle execution time limits is through trigger configurations within Orchestrator

Hope this clarifies

Cheers @Juan_Esteban_Valencia