订阅

UiPath Orchestrator

UiPath Orchestrator 指南

关于作业

📘

在开始之前

Mastering jobs requires that you first get the hang of processes. Learn about runtime arguments, process types, and process compatibility.

A job represents the execution of a process on a UiPath Robot. You can launch the execution of a job in either attended or unattended mode. You cannot launch a job from Orchestrator on attended robots, unless for debugging or development purposes.

Attended jobs can be triggered from the UiPath Assistant or the Robot Command Line Interface. Unattended jobs are launched from Orchestrator, either directly on the spot from the Jobs or Processes page, or in a preplanned manner through triggers, on the Triggers page.

The Jobs page represents the jobs control center, where you can monitor launched jobs, view their details and logs, and stop/kill/resume/restart a job.

Click for field descriptions for the Jobs page
FieldDescription
ProcessThe name of the process.
[Remote debugging job] is displayed for jobs started from Studio through remote debugging sessions.
MachineThe machine object used for connecting the executing infrastructure to Orchestrator.
HostnameThe name of the workstation used for execution.
Host identityThe identity under which the execution takes place. The following values are possible:
<Domain\Username> - jobs executed under that specific account. Displayed in the following cases:
foreground jobs regardless of the Robot version;
all jobs executed on Robots lower than 2021.10;
attended jobs executed on robots connected using a machine key, without user sign-in.

Note: For Robots older than 2021.10, the host identity gets populated dynamically according to the account settings made in Orchestrator. Changing the domain\username for the account used to execute a job changes the host identity as well.

ROOT - background jobs executed on Linux robots.

NT AUTHORITY\LOCAL SERVICE - jobs executed under the Robot service identity. Displayed for background jobs executed on Robots 2021.10+ without credentials.
ⓘ Service mode robots run under NT AUTHORITY\LOCAL SERVICE. User mode robots run under a certain user identity.

N/A - jobs started from the Assistant by users connected using interactive sign-in. For robots connected using the machine key, without user sign-in, the <Domain\Username> is displayed.
Job typeThe type of job according to where the execution takes place and depending on whether the robot impersonates a user or not:
Service unattended - The execution happens on a server and the robot does not impersonate a user. Jobs are launched from Orchestrator
Personal remote - The execution happens on a server and the robot runs under the identity of a personal workspace owner. Jobs are launched from Orchestrator.
Attended - The execution happens on a user's personal machine. Jobs are launched from the Assistant.
Development - The execution happens on a server. Jobs are launched from Studio through remote debugging.
Runtime typeThe runtime type used for execution.
StateThe state of the job. See details about job states.
PriorityThe priority of the job. See details about job priorities.
StartedThe amount of time since the job has started executing. Hovering over this field displays the exact start time and date.
EndedThe amount of time since the job has finished executing. Hovering over this displays the exact end time and date.
SourceThe agent of the execution.
[trigger_name] - The job was started by that trigger.
Assistant - The job was started by the UiPath Assistant.
Manual - The job was started from Orchestrator.
Studio - The job was started for debugging purposes from Studio.

16161616

文件夹

16151615

Personal Workspace

帐户-计算机映射


When starting a job or defining a trigger, you can define specific account-machine pairs on which execution takes place. Account-machine mappings enable you to tie unattended usage under particular accounts to specific machine templates. The gives granular control over the execution targets of your automation. Account-machine mappings can be tenant-based (not tied to a specific folder), or folder-based (tied to a specific folder).

Learn how to configure account-machine mappings.

执行目标


根据在 Orchestrator 中启动作业的机制,您可以隐式选择和配置作业分配策略和执行目标。本文介绍了从“作业”页面启动作业时可用的分配策略和执行目标。

了解触发器的执行目标

📘

作业执行依赖项

如果作业执行依赖于尚不可用的特定资源,则在满足作业执行条件之前,作业将保持“待处理”状态。
例如,用户 U1 使用凭据 C1 连接到主机名 H1。但是,输入了错误的凭据 C2 以连接到主机名。因此,作业进入待处理状态。如果稍后将凭据更新为正确的凭据(即 C1),则作业将继续执行。

📘

注意

If the Robot becomes unresponsive (the robot machine is down, or the Robot Service crashes) during job execution, after reconnecting, it restarts the execution of the jobs that were running during the crash.

12161216

1. 动态分配

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.

使用“动态分配”选项,您可以在一个作业中最多执行一个流程 10000 次。

2. 帐户

该流程在特定用户或机器人帐户下执行。如果未指定帐户,则 Orchestrator 会动态分配帐户。同时指定帐户和计算机意味着作业将在该特定帐户-计算机对上启动。

3. 计算机

此流程在附加到所选计算机模板的其中一台主机上执行。指定模型会显示一个附加的“主机名”选项,允许您从已连接的主机计算机池中选择特定主机。仅指定计算机会导致 Orchestrator 动态分配帐户。同时指定帐户和计算机意味着作业将在该特定帐户-计算机对上启动。

确保将与作业类型匹配的运行时分配给关联的计算机模型。仅显示与活动文件夹关联的已连接主机。

4. Schedule ending of job execution

The process execution may sometimes be faulty, causing the job to remain in the pending state. The toggle allows you to automate a strategy for stopping the job, by specifying the amount of time that can pass until the job is stopped or killed. To cover the case of a job that cannot be stopped, you have the option to kill the job.

5. Keep account-machine allocation on job resumption

The process resumes their execution on any available robot on any available machine by default. To keep the same account-machine configuration ensures an optimized use of resources and license requirements.

 

❗️

动态分配使用约定

您需要为主机上相应计算机模型分配到的文件夹中的每个帐户配置 Windows 用户。
假设您使用计算机模型 FinanceT 生成的密钥将服务器连接到 Orchestrator。该计算机模型已分配到文件夹 FinanceExecution 和 FinanceHR,其中也分配了 6 个帐户。需要将这 6 个帐户设置为服务器上的 Windows 用户。

如果将作业配置为多次执行相同的流程,则会为每次执行创建一个作业条目。根据作业的优先级和创建时间对作业进行排序,优先级较高、较早的作业排在第一位。机器人可用后,它将立即执行下一个作业。在此之前,作业仍处于挂起状态。

Setup

  • 1 个文件夹
  • 1 个带有两个运行时的计算机模型
  • 2 accounts: john.smith and petri.ota
  • 2 个需要用户交互的流程:P1 - 将队列项目添加到队列,P2 - 处理队列中的项目
  • The machine template and the accounts must be associated to the folder containing the processes.

预期结果

  • 任何人都以高优先级执行 P1。
  • P2 由 petri.ota 以低优先级执行。

所需的作业配置

  • Start a job using P1, don't assign it to any particular account, set the priority to High.
  •  作业 1

  • 启动 P2 的作业,将其分配给 petri.ota,将优先级设置为“低”
  •  作业 2

 

执行优先级


在部署流程或为该流程配置作/触发器时,您可以通过“作业优先级”字段控制哪个作业优先于其他竞争作业。作业的优先级分为以下十种:

256256

手动启动作业

作业优先级” 字段的默认值为“继承”,这意味着优先级是从最初配置的位置继承的。 您可以保持原样,也可以进行更改。
Automations Page > Jobs
作业继承在流程级别设置的优先级。
Automations Page > Triggers
如果触发器的优先级为“继承”,则作业将继承在流程级别设置的优先级。
如果触发器的优先级与Inherited不同,则作业将继承在触发器级别设置的优先级。 如果将其更改为Inherited ,则使用在流程级别设置的优先级。
Automations Page > Processes
作业继承为该流程设置的优先级。

如果将作业配置为多次执行相同的流程,则会为每次执行创建一个作业条目。根据作业的优先级和创建时间对作业进行排序,优先级较高、较早的作业排在第一位。机器人可用后,它将立即执行下一个作业。在此之前,作业仍处于挂起状态。

通过触发器启动作业

默认情况下,优先级设置为“已继承”,这意味着它将继承流程级别的值。选择流程会自动更新箭头图标,以说明在流程级别设置的值。触发器启动的所有作业的优先级都设置在触发器级别。如果保留默认的“已继承”,则将以在流程级别设置的优先级启动作业。
Any subsequent changes made at the process level are propagated to the trigger, and the jobs created through it implicitly.

使用 API 设置作业优先级

界面中可用的 10 个优先级对应于 API 中的 100 个级别,这意味着 API 允许您设置更精细的优先级。 这些级别映射如下:

MinimumMaximumDefault
Lowest1105
Very low112015
Low213025
Medium-low314035
Medium415045
Medium-high516055
High617065
Very high718075
Highest819085
Critical9110095

要设置或更改作业的优先级,请使用SpecificPriorityValue参数,该参数在以下端点中可用:

  • POST​/odata​/Jobs​/UiPath.Server.Configuration.OData.StartJobs
  • POST/odata​/ProcessSchedules
  • PUT/odata​/ProcessSchedules({key})

假设您有两个作业的优先级分别设置为 92 和 94。 它们都在“严重”范围内,但优先级为 94 的作业将在优先级为 92 的作业之前执行。

📘

注意

如果您启动的作业需要用户干预同一台未在 Windows Server 上运行的计算机上的多个机器人,则所选流程仅由第一个机器人执行,而其余流程将失败。将为每个执行创建一个实例,并将其显示在“作业”页面上。

Jobs on High-Density Robots


如果您从同一台 Windows Server 计算机上的多个高密度机器人上启动作业,则意味着所选流程由每个指定的机器人同时执行。将为每个执行创建一个实例,并将其显示在“作业”页面上。

If you are using High-Density Robots and did not enable RDP on that machine, each time you start a job, the following error is displayed: “A specified logon session does not exist. It may already have been terminated.” To see how to set up your machine for High-Density Robots, please see the About Setting Up Windows Server for High-Density Robots page.

录制


For unattended faulted jobs, if your process had the Enable Recording option switched on, you can download the corresponding execution media to check the last moments of the execution before failure.
仅当您对执行介质具有“查看”权限时,“下载录制”选项才会显示在“作业”窗口中。

约一个月前更新


关于作业


建议的编辑仅限用于 API 参考页面

您只能建议对 Markdown 正文内容进行编辑,而不能建议对 API 规范进行编辑。