I want to know how long to wait for the job to finished

Hello :slight_smile:

I’m using POST​/odata​/Jobs​/UiPath.Server.Configuration.OData.StartJobs to start process, and I wait for the Job to finish.

Then I retrieve the output arguments using the endpoint GET ​/odata​/Jobs(ID).

Is there a way to know when to send GET /odata/Jobs(ID) api?
I want to know how long to wait for the job to finished.

Thank for your help in advance!

Hi @sssi,

You can refer the documentation portal for details -

https://docs.uipath.com/orchestrator/reference/about-odata-and-references

Thanks

Hi @sssi ,

I would suggest the best method would be to set Max time the Process usually takes for Execution as Delay before calling the /odata/Jobs(ID).

Or

You could use the Start Job Activity at the End of the Process, to start the Job which will call the Get Jobs ID API.

image

Maybe Explaining a bit more as to why do you need the Jobs ID API right after it’s execution, would help us provide you with better suggestions.

Hi @supermanPunch
Thanks for reply!

I deploy the process to orchestrator and then run the process using orchestrator’s start jobs api.

Then, I wanted to receive an output argument returned as a result of process execution, but there was a problem that Null was returned.

This was because start.jobs api did not wait until the end of the process, so null was returned, and in order to get the output argument, I send get/odata/jobs(id) api after the process.

But I didn’t know how long it would take until the process was over, so I wanted to know when to send get api.

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