- 发行说明
- 入门指南
- UiPath Assistant
- 安装和升级
- 机器人类型
- 机器人组件
- 许可
- 将机器人连接到 Orchestrator
- 流程与活动
- 日志记录
- Robot JavaScript SDK
- 特定场景
- 监管
- 故障排除
Unattended Robot 用于自动执行不需要人工监督的任务,它们通常在专用计算机上的虚拟环境中运行,并且自动化由 Orchestrator 控制。
可以在需要时从 Orchestrator 手动启动无人值守的自动化,但是如果任务必须在特定的时间间隔(每天,每小时,每周)或在特定的时间和日期(一周的结束)开始,则还可以安排无人值守的自动化。
本文档将指导您完成使用 UiPath 企业版许可版本运行第一个无人值守的自动化的过程,从构建自动化,设置环境以及运行无人值守的流程开始。
要运行无人值守的自动化,需要采取以下步骤:
1. 创建自动化并将其发布到 Orchestrator
为了提供一个真实的例子,让我们假设我们需要每天早上 9 点在服务器上备份日志文件。为此,我们需要将当天的日志文件复制到另一个文件夹。在此示例中,我们将“Logs.txt”文件从“Logs”文件夹复制到“Old Logs”文件夹,每次都覆盖备份。
-
创建新流程,添加“复制文件”活动,配置文件的字段/路径,然后选择“覆盖”选项,以便每天可以替换新复制的文件。
-
将流程发布到 Orchestrator。
-
单击 Studio 功能区右侧的“发布”按钮,
-
在“发布属性”选项卡中,输入包的名称。
-
在“发布选项”选项卡中,将“发布至”选项选择为“Orchestrator 租户流程订阅源”,即无人值守机器人可以访问自动化的位置。
-
Click Publish.
For more information, see About Publishing Automation Projects in the Studio Guide.
-
在 Orchestrator 中,创建无人值守机器人用于运行自动化的流程。
-
访问 https://cloud.uipath.com,访问您的 Automation Cloud 实例, 然后选择 Orchestrator 租户。
-
在 Orchestrator 中,选择“共享”文件夹>“流程”,然后单击右侧的“添加”按钮以打开“添加流程”页面。
-
选择包,然后单击“创建”,以将流程添加到共享文件夹中。
备注:请记住,您将在此流程中使用两个实体。第一个实体是您,即创建和发布流程的开发者。第二个是在无人值守计算机上运行自动化和机器人的无人值守用户。
2. 设置 Windows 计算机以运行 Unattended Robot
Set up a Windows Machine that runs the Unattended Robot, ideally this would be a cloud virtual machine. Make sure that its screen saver functionality is disabled and matches the Hardware and Software Technical Requirements.
For example, you can host your virtual machine on Azure, see the Windows VMs Overview document for details on how to set up a Windows Virtual Machine in Azure.
Other environments such as AWS, VM Ware or Citrix are supported as well if they match the Hardware and Software Technical Requirements.
3. 在 Orchestrator 中创建 Unattended Robot
无人值守机器人由两部分组成:帐户和运行作业的计算机。帐户是用于权限和触发机器人作业的身份证明,而计算机则提供执行作业的计算能力。
-
创建并设置帐户。
-
Creating the account: For unattended automations, we recommend creating a robot account, which is a service-type identity that does not require an email address. However, if the job must run under a particular user's identity (for permissions or audit purposes), you can opt for creating a user account instead.
-
Add the account to folders which contain the jobs it needs to run.
-
创建计算机模型。
备注:While you could opt to create a single standard machine, for this example we are creating a machine template instead. Machine templates make it easier to deploy several machines by defining the configuration once and then using a single set of client credentials to allow multiple robots to connect to Orchestrator.
-
In Orchestrator, go to Tenant > Folders.
-
Select the target folder from the list, and then select the Machines tab.
-
In the top right, click Manage Machines in Folder.
-
On the Manage Machines in Folder page, click the Add machine in the top right and select Machine template.
-
Configure the machine template and assign one unattended runtime only. For detailed instructions, see Adding a machine template.
-
复制计算机密钥以备后用。
If this machine template should be used to run jobs from several folders, add the machine template you created to all the necessary folders. For instructions, see Assigning machine objects to folders.
4. 在无人值守计算机上安装机器人
The UiPathStudio.msi installer is used to install Studio, the UiPath Assistant, or the Robot on your machine. Using the .MSI installer, the Robot is deployed in Service-Mode by default, meaning that it is available to all users on the machine. For running the installer administrator rights are needed.
可以从资源中心或直接从 Automation Cloud 主页下载 UiPathStudio.msi 安装程序。
Robot 和 Studio 默认安装在以下位置 - C:\Program Files \UiPath\Studio。您可以使用命令行参数或从安装程序界面更改安装位置。
Step-by-step details on how to install the Robot are found in the Installing the Robot document.
5. 将机器人连接到 Orchestrator
If during the installation process you choose to only install the Robot, the connection to Orchestrator can only be configured From the Command Line Interface (admin rights are needed) or from the UiPath Assistant . Otherwise, you can connect your Robot either from Studio or from the UiPath Assistant.
来自 Studio
安装完成后,系统将显示“连接到 Orchestrator”屏幕,默认情况下会要求您使用“使用计算机密钥”,因为这是无人值守机器人的推荐配置。计算机名称是自动获取的,您所要做的就是输入 Orchestrator URL 以及之前保存的计算机密钥。
使用 .MSI 安装程序,在将机器人连接到 Orchestrator 时,整个计算机都将连接,而不仅仅是当前登录计算机的用户。
通过 UiPath Assistant
- 打开 UiPath Assistant
- 在“首选项”菜单上,选择“首选项”。“首选项”窗口随即显示。
- 导航到“Orchestrator 设置”。
- 在“Orchestrator URL”字段中,输入 Orchestrator 的网址。
- 在“计算机密钥”字段中,输入您先前复制的密钥。
Click here for details about the different machine entities in Orchestrator and when to use each.
-
单击“连接”。状态应显示为
Connected, Licensed备注:使用企业版安装程序(
.MSI)设置计算机时,您可以退出登录计算机,因为机器人可以使用步骤 3 中提供的凭据来创建自己的 Windows 会话。
6. 测试自动化
为了测试无人值守机器人上的自动化,请转到 Orchestrator 中共享文件夹的自动化->流程部分,并查找在步骤 1 中部署的流程。
您可以看到该流程的详细信息,并且右侧会显示“启动作业”按钮。
单击后,系统将显示“启动作业”界面,选择用户和之前配置的计算机,然后单击“启动”。
这将启动所选计算机上的所选无人值守流程,您可以在 Orchestrator 中“共享文件夹”的“作业”部分中监视作业。
7. 安排自动化
对于本指南中提供的示例,我们可以安排它每天早上9点运行。这是从Orchestrator中共享文件夹的“触发器”部分配置的。
根据上面的屏幕截图设置时间表后,将触发 Logs.Backup 流程每天在世界标准时间上午 9 点代表选定的用户在无人值守计算机上运行。