Orchestrator
2023.10
false
Banner background image
Orchestrator User Guide
Last updated Feb 15, 2024

Managing Jobs

Starting a Job

Before going through the steps below, you need to create a process.

  1. Navigate to Automations > Jobs from the folder that the process resides in.
  2. Click Start. The Start Job window is displayed.
  3. From the Process Name drop-down, select a process that has been previously deployed to the current folder.
  4. Configure the required fields, as outlined in the sections below.
  5. Click Start. The Start Job window closes and, if there are available runtimes on the currently active folder, the job starts on a Robot according to the settings you made. The State of the job is displayed in real-time on the Jobs page.

Setting the job priority

From the Jobs Priority drop-down, select the priority of the job to be executed, if you want it to be different from the priority set at the process level. This field is automatically populated with the priority inherited from the package.

Selecting the execution runtime

From the Runtime type drop-down, select the runtime type used to execute the job.

The number of available and connected runtimes is displayed below the drop-down.

  • _ Available - The number of available runtimes, calculated as the total number of runtimes minus the number of running jobs.
  • _ Connected - The total number of runtimes, calculated as the sum of runtimes on all machines connected to Orchestrator that is associated with the active folder.

    Runtime type

    Description

    Production (Unattended)

    The job is executed in unattended mode consuming an Unattended runtime.

    Testing

    The job is executed in unattended mode consuming a Testing runtime.

    NonProduction

    The job is executed in unattended mode consuming a NonProduction runtime.

Example: Say you have 2 NonProduction runtimes and 1 Unattended runtime on machine template A, and 3 NonProduction runtimes, and 2 Unattended runtimes on machine template B. Both are associated with one folder. On each template, you connect one host machine. The resulting runtime state is the following:

  • Unattended: 3 Available, 3 Connected
  • NonProduction: 5 Available, 5 Connected

A running job occupying a runtime subtracts 1 from the number of available runtimes for that type.

Note:

At publish time, Orchestrator chooses from the available personal workspace runtimes to execute the job. The runtime precedence is the following:

  • Production (Unattended)
  • Nonproduction

For example, if no Production runtime exists, Orchestrator uses an available NonProduction runtime. If none exists, the job fails.

If the selected runtime becomes unavailable between job executions, the upcoming job execution fails, since Orchestrator does not look for the next available one.

Configuring the execution target

Configure your execution target by setting the options below as desired on the Execution Target tab.



Allocate Dynamically

Dynamic allocation with no explicit account and machine selection allows you to execute a foreground process multiple times under the account and machine that become available first. Background processes get executed on any account, regardless if it's busy or not, as long as you have sufficient runtimes.

Using this option you can execute a process up to 10000 times in one job.

Account

You can choose one of these approaches:

  • Specifying an account means the process is executed under that specific user or robot account.
  • Specifying both the account and the machine means the job launches on that very account-machine pair. Only valid account-machine pairs are available for selection.
  • Specifying no account results in Orchestrator allocating the account dynamically.

Machine

You can choose one of these approaches:

  • Specifying a machine object means the process is executed on one of the host machines attached to the selected machine template. Select a specific host machine from the pool of connected host machines on the Connected Machines field.
  • Specifying both the account and the machine means the job launches on that very account-machine pair. Only valid account-machine pairs are available for selection.
  • Specifying no machine results in Orchestrator allocating the host machine dynamically.

Make sure that runtimes matching the job type are allocated to the associated machine template. Only connected host machines associated with the active folder are displayed.

Select valid account - machine mappings

Choose which specific account-machine pair will run the job.
docs image
You can click Add Account-Machine mapping if you want your job to run on multiple such pairs. If you do so, a Pending job is created for each account-machine pair.
Note: This only works if the Enable user-machine mapping option on the General tab of your tenant settings is selected.

Keep Account/Machine allocation on job resumption

This field allows you to configure whether the different fragments of a long-running job are executed on the same account-machine pair.

By default, a suspended job is resumed on any available robot on any available machine.

Based on your license or resource requirements, you have the option to resume a job on the same machine and in the same account context that started the job.

Say you need an SAP license to execute a job. Instead of installing an SAP license on every available machine (increased costs), you can install it on a single machine and use that machine to start and resume the job. The same strategy may apply to user licenses. You can allocate only one user license and use it to execute the job.

Schedule ending of job execution

The process execution may sometimes be faulty, causing the job to remain in the pending state. Turning on the toggle allows you to (click to expand):

  • Select Stop from the drop-down menu - this attempts to gracefully end the execution after the defined time interval has passed since the job is stuck in a pending state (set the time to a minimum of 1 minute, maximum of 10 days, 23 hours and 59 minutes).


  • Select Kill from the drop-down menu - this attempts to forcefully end the execution after the defined time interval has passed since the job is stuck in a pending state (set the time to a minimum of 1 minute, maximum of 10 days, 23 hours and 59 minutes).


  • Select Stop from the drop-down menu and turn on the Schedule automatic "Kill", if the job does not stop option - this attempts to gracefully end the execution after the defined time interval has passed since the job is stuck in a pending state and then attempts to forcefully end it after the defined time interval has passed since the job is stuck in a stopping state (set the time to a minimum of 1 minute, maximum of 10 days, 23 hours and 59 minutes).


Generate an alert if the job is stuck in pending or resumed status

By turning on the toggle, you activate alerts about jobs that remain in the pending or resumed status longer than the specified duration.

The configurable duration is minimum one minute and maximum eleven days.

If the job exceeds the configured duration, an "Error" severity alert pop-up informs you about it with the following text:

"N jobs for #process {process_number} have been pending or resumed for more than X hours and Y minutes.", where:

  • N - is the number of jobs that triggered the alert
  • {process_number} - the process identifier
  • X - the configured number of hours the job exceeded while having the pending or resumed status. Days are converted to hours.

  • Y - the configured number of minutes the job exceeded while having the pending or resumed status.

Generate an alert if the job started and has not completed

By turning on the toggle, you activate alerts about jobs that do not complete in the specified duration.

The configurable duration is minimum one minute and maximum eleven days.

If the job exceeds the configured duration, an "Error" severity alert pop-up informs you about it with the following text:

"Job for #process {process_number} has been pending been running for more than X hours and Y minutes.", where:

  • {process_number} - the process identifier
  • X - the configured number of hours the job exceeded while trying to complete. Days are converted to hours.

  • Y - the configured number of minutes the job exceeded while trying to complete.

Orchestrator prevents starting jobs on invalid configurations. Trying to start a job in an invalid setup results in a descriptive error message providing you with details about how to fix your configuration.



Starting a job using dynamic allocation, i.e. no machine or account specified, with an incompatible folder setup results in an error. Make sure to correct the setup, otherwise, jobs stay pending indefinitely. For example, trying to run a .NET Framework 4.6.1 background job when there are only cross-platform templates in the folder does not work, as jobs stay pending until the configuration is fixed.

Adding arguments

On the Arguments tab, provide input arguments for the selected process. This tab is automatically populated with all the input arguments accepted by the selected process, and the corresponding values inherited from the package.

Starting a job through an API trigger

You can start a job via an API trigger from your third-party application of choice. Follow these steps:

  1. Create an API trigger based on the process that you want to run. This generates the necessary URL for starting the job. Follow the instructions in the Creating an API trigger topic to achieve this.
  2. Create a dedicated personal access token and grant it access to the necessary resources. This is done at the organization level, from the Preferences > Personal Access Token page. Once saved, make sure to copy the PAT at once, as it will not be displayed again.
  3. Paste the personal access token in the bearer token field to authorize your request.
  4. Get the job URL by clicking the Copy full slug URL option next to the desired tenant in the triggers list, then paste it in your tool.
  5. Configure your arguments as needed.

    You can enter arguments as:

    Query string parameters

    For a job with the hw-process slug and with the files and folders arguments, the cURL that you can use in the command line will look like this:
    curl --location --request POST 'https://{yourDomain}/t/6ea73196-ca89-446c-81e1-5279bdd36dc2/hw-process?argument1=files&argument2=folders' \
    --header 'Cookie: __cf_bm=_5E_r3oulk6zLCr6.CUij.RFN4lCeTgYMR31gradWtI-1697542233-0-AdP+xhO+SE5PQ6wnoEum5qRu4wzUgGgOrezRhHrR4dcVvhsvl9yV/V3KAFhi/TmomqMtmxc426WT83lDMoL1seQ='curl --location --request POST 'https://{yourDomain}/t/6ea73196-ca89-446c-81e1-5279bdd36dc2/hw-process?argument1=files&argument2=folders' \
    --header 'Cookie: __cf_bm=_5E_r3oulk6zLCr6.CUij.RFN4lCeTgYMR31gradWtI-1697542233-0-AdP+xhO+SE5PQ6wnoEum5qRu4wzUgGgOrezRhHrR4dcVvhsvl9yV/V3KAFhi/TmomqMtmxc426WT83lDMoL1seQ='

    Form data

    For a job with the hw-process slug and with the files and folders arguments, the cURL that you can use in the command line will look like this:
    curl --location 'https://{yourDomain}/t/6ea73196-ca89-446c-81e1-5279bdd36dc2/hw-process' \
    --header 'Cookie: __cf_bm=_5E_r3oulk6zLCr6.CUij.RFN4lCeTgYMR31gradWtI-1697542233-0-AdP+xhO+SE5PQ6wnoEum5qRu4wzUgGgOrezRhHrR4dcVvhsvl9yV/V3KAFhi/TmomqMtmxc426WT83lDMoL1seQ=' \
    --form 'argument1="files"' \
    --form 'argument2="folders"'curl --location 'https://{yourDomain}/t/6ea73196-ca89-446c-81e1-5279bdd36dc2/hw-process' \
    --header 'Cookie: __cf_bm=_5E_r3oulk6zLCr6.CUij.RFN4lCeTgYMR31gradWtI-1697542233-0-AdP+xhO+SE5PQ6wnoEum5qRu4wzUgGgOrezRhHrR4dcVvhsvl9yV/V3KAFhi/TmomqMtmxc426WT83lDMoL1seQ=' \
    --form 'argument1="files"' \
    --form 'argument2="folders"'

    JSON body text

    For a job with the hw-process slug and with the files and folders arguments, the cURL that you can use in the command line will look like this:
    curl --location 'https://{yourDomain}/t/6ea73196-ca89-446c-81e1-5279bdd36dc2/hw-process' \
    --header 'Content-Type: application/json' \
    --data '{
        "argument1" = "files"
        "argument2" = "folders"
    }
    'curl --location 'https://{yourDomain}/t/6ea73196-ca89-446c-81e1-5279bdd36dc2/hw-process' \
    --header 'Content-Type: application/json' \
    --data '{
        "argument1" = "files"
        "argument2" = "folders"
    }
    '

    Arguments can also be entered through a combination of the aforementioned methods.

  6. Run the job.

    Depending on the call mode you selected in the trigger definition, the job will run as follows:

    • Async polling

    • Async fire & forget

    • Sync (long-polling)

    Note that the call mode can be overriden in the query string or body using the $callMode parameter.

    For details on these options, see the Call modes explained section.

Rate limiting

The number of requests that can be made to the status endpoint is limited to 10 per every 10 seconds for every started job.

Pending jobs limit

The maximum number of pending jobs started through API triggers is 100. This can be changed using the Triggers - API Triggers - Maximum pending jobs limit tenant-level setting, which has a default value of 10.

Stopping a Job

Click the corresponding More Actions button, and then Stop. The automation project is executed until it finds a Should Stop activity. During this time, the job is in the Stopping state. If the activity is encountered, the execution is stopped, and the job's final status is Successful. If a Should Stop activity is not found, the job execution does not stop until it reaches the end of the project. The final status, in this case, is Successful as well.

Note:
  • A job started from Orchestrator can be stopped only from Orchestrator.
  • A job started from the Assistant can be stopped both in Orchestrator, from the Jobs page, and using the UiPath Assistant.
  • Once a job has been stopped, the job ending schedules are lost and you need to reconfigure Schedule ending of job execution options at job restart.

Resuming a Job

Click the corresponding More Actions button, and then Resume.

Killing a Job

Click the corresponding More Actions button, and then Kill. The automation project is forcefully stopped, the job is marked as Stopped, and "Job canceled" is displayed in the Job Details window.

Note:
  • A job started from Orchestrator can be killed both in Orchestrator, from the Jobs page, and using the UiPath Assistant.
  • A job started from the Assistant can be killed both in Orchestrator, from the Jobs page, and using the UiPath Assistant.
  • Once a job has been killed, the job ending schedules are lost and you need to reconfigure Schedule ending of job execution options at job restart.

Restarting a Job

This feature enables you to quickly run a job from the jobs list, without going through the configuring job flow. You can restart any job with a final state – Stopped, Faulted or Successful.

Note:
  • You cannot restart jobs triggered by agents such as the Assistant or through Studio remote debugging sessions.
  • When you restart a job that had Schedule ending of job execution options active, you need to reconfigure these options.

This procedure starts from the presumption that you previously started a job that already reached a final status.

  1. Click the corresponding More Actions button, and then Restart. The Start Job window is displayed, with the job's initial settings.
  2. Make the desired changes.
  3. Click Start. The Start Jobs window closes and the execution starts. The status of each job is displayed, in real-time, on the Jobs page.

Viewing Job Logs

To view the logs for a specific job, click the corresponding More Actions button, and then View Logs. The Logs page is displayed and contains data regarding the indicated job.

Note: Logs generated for jobs started through remote debugging sessions are not available on the Job logs page. Find them on the global Logs page.

Viewing Job Details

To view details about a specific job, click the corresponding View Details button. This displays the Job Details window, where you can find various information such as:

  • the name of the underlying process
  • the executing robot and machine
  • the reasons behind jobs failing
  • the reasons behind the job not starting
  • actions you can take to fix any issues and trigger the job to start

Completed job details



Pending job details

docs image
Note: The Info field does not display licensing considerations for jobs failing. Use the monitoring functionality for details on licensing.

Downloading Execution Media

To download the recording for a faulted job, click More Options > Download Recording. Execution media is downloaded according to your settings.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.