RPA(Robotic Process Automation)小白修炼营之RPARPA

使用命令行定时触发机器人-UiPath

2019-11-28  本文已影响0人  Xiangdong_She

[TOC]

1. 系统操作

[window键+R键]->运行[run]窗口->输入:services.msc 点击确定(或按回车)打开服务


image

找到Task Scheduler

image

[开启服务] 双击打开服务→启动类型→设置成自动→应用

[关闭服务] 双击打开服务→启动类型→设置成禁用→应用

image

2. 定时任务设置

2.1 开启任务计划程序(Task scheduler)

image

[搜索]->[查找任务计划程序(Task Scheduler)]->[ 任务计划程序(Task Scheduler)]

image

任务计划程序(Task Scheduler)界面

image

2.2 创建定时任务

[创建任务]<->[Create Task]

选择对应文件夹->右键->选择[Create Task]

image

[常规]<->[General]

名称name->安全选项[Security options](勾选:只有用户登陆运行[Run only when user is logged on])

image

[触发器]<->[Triggers]

新建[New]->设置settings->确定[ok]

image

[操作]<->[Actions]

新建[New]->设置[settings](程序或脚本: "UiPath.robot.exe程序路径"->-file "要运行的*.xaml文件路径" --monitor)->确定[ok]

运行脚本的命令行可以参考如下:

打包、连接Orchestrator的命令行及详解可以到RPA星球交流,微信扫描文档底部二维码加入。

通过命令行方式启动流程的语法
前提:进入到UiRobot所在目录"cd C:\Users\${user}\AppData\Local\UiPath\app-19.11.0-beta0002" ${user}需要替换为自己的用户名,app后面版本号根据自己的安装决定
使用方式: UiRobot execute [--process <package_id> | --file <file_path>] [--input <input_params>] [--folder <folder_path>]
示例:
    UiRobot execute --process UiPathDemo
    UiRobot execute --process UiPathDemo --folder "Product/Development/QA" --input "{'inArg':'value'}"
    UiRobot execute --file "C:\UiPath\Project\project.json"
    UiRobot execute --file "C:\UiPath\Project\Main.xaml" --input "{'inArg':'value','integer':3}"
    UiRobot execute --file "C:\UiPath\Project\Notepad.1.0.6682.21636.nupkg"
C:\Users\xshe\AppData\Local\UiPath\app-19.9.0-beta0103\UiRobot.exe execute --file C:\Work\RPAProject\RPAUtils\SecureString.xaml
C:\Work\RPAProject\RPAUtils\DrawingPicture_Final\Main.xaml
C:\Users\xshe\AppData\Local\UiPath\app-19.9.0-beta0103\UiRobot.exe execute --file C:\Work\RPAProject\RPAUtils\DrawingPicture_Final\Main.xaml
image

条件<->[Conditions]

全部不勾选

image

设置<->[Settings]

勾选 允许按需运行[Allow task tobe on dwmard] 其余不勾选

选择将新实例排队[Queue a new instance]

image

确认[Ok]

image

2.3 修改定时任务

任务计划程序库->选中自己的任务,右击->属性->在弹窗中修改(与创建一致)

image

2.4 管理定时任务

通过左侧文件目录对定时任务进行归类

image

选择对应的定时任务->右下进行状态管理(运行[run],启动任务[enable],停止任务[disable]…)

image

2.5 监测运行状态

刷新[refresh]->查看最后一次运行状态[last Run result](成功运行会显示succeed,不成功则显示 (0×1))

image

3. 加入RPA知识星球

现在加入星球,与RPA大牛一起学习

上一篇下一篇

猜你喜欢

热点阅读