> For the complete documentation index, see [llms.txt](https://o2oa.gitbook.io/course/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://o2oa.gitbook.io/course/liu-cheng-guan-li/fu-wu-guan-li/dai-li.md).

# 代理

代理是运行在服务器端的定时任务，使用Javascript编写，可以直接调用Java类。

## 入口

点系统的左上角导航->设计中心->服务管理->代理打开。

![](/files/-LmXtrEDUSfWG7Z9_lle)

## 触发时间

点击“定时任务cron表达式”可选择cron表达式进行触发时间的配置。cron表达式详解[点击这里](http://www.o2oa.net/x_component_Template/widget/$CronPicker/cron_express_description.html)。

## 代理调试 <a href="#jie-kou-tiao-shi" id="jie-kou-tiao-shi"></a>

‌

打开URL： [http://centerServer:20030/x\_program\_center/jest/index.html](http://dev.o2oa.net:20030/x_program_center/jest/index.html#)​

![](/files/-LmxVvl70usI9aEi-9Us)

在 上图的服务中填写代理的标识，然后点击GET，可以忽略触发时间设置，马上执行代理。

可以在代理中使用`print( text )`在服务器控制台输出调试信息。

## 完整样例

| 样例名称    | 链接                                                                                                |
| ------- | ------------------------------------------------------------------------------------------------- |
| 统一待办    | ​[链接](http://www.o2oa.net/x_component_service_AgentDesigner/sample/sync2todo_UnifiedWorkbench.js) |
| EXCEL操作 | [链接](http://www.o2oa.net/x_component_service_AgentDesigner/sample/ImportPersonFormExcel.js)       |

更多样例可以查看 webServer/x\_component\_service\_AgentDesigner/sample/目录
