脚本任务实现

This commit is contained in:
xueli.xue 2017-04-27 18:04:29 +08:00
parent 935cc1276f
commit 113e70cab7
3 changed files with 13 additions and 5 deletions

View File

@ -24,6 +24,7 @@ XXL-JOB是一个轻量级分布式任务调度框架其核心设计目标是
- 17、路由策略执行器集群部署时提供丰富的路由策略包括第一个、最后一个、轮询、随机、一致性HASH、最不经常使用、最近最久未使用、故障转移
- 18、Rolling日志支持以Rolling方式实时查看执行器输出的日志信息实时监控任务进度
- 19、运行报表支持实时查看运行数据如任务数量、调度次数、执行器数量等以及调度报表如调度日期分布图调度成功分布图等
- 20、脚本任务支持开发脚本任务如Shell、Python和Groovy等脚本;
#### 1.3 发展
于2015年中我在github上创建XXL-JOB项目仓库并提交第一个commit随之进行系统结构设计UI选型交互设计……

View File

@ -76,7 +76,7 @@
<th name="jobGroup" >jobGroup</th>
<th name="childJobKey" >JobKey</th>
<th name="jobDesc" >描述</th>
<th name="executorHandler" >JobHandler</th>
<th name="glueType" >运行模式</th>
<th name="executorParam" >任务参数</th>
<th name="jobCron" >Cron</th>
<th name="addTime" >新增时间</th>
@ -192,7 +192,6 @@ public class DemoGlueJobHandler extends IJobHandler {
</textarea>
<textarea class="glueSource_shell" style="display:none;" >
#!/bin/bash
echo "xxl-job: hello shell"
for item in 1 2 3
@ -217,7 +216,6 @@ logging.info('xxl-job: hello python')
for num in range(1, 3):
time.sleep(1)
logging.info('python :' + str(num) )
logging.info('Good bye!')
</textarea>

View File

@ -45,11 +45,20 @@ $(function() {
},
{ "data": 'jobDesc', "visible" : true,"width":'20%'},
{
"data": 'executorHandler',
"data": 'glueType',
"width":'20%',
"visible" : true,
"render": function ( data, type, row ) {
return (row.glueSwitch > 0)? "GLUE模式" : data;
if ('GLUE_GROOVY'==row.glueType) {
return "GLUE模式(Java)";
} else if ('GLUE_SHELL'==row.glueType) {
return "GLUE模式(Shell)";
} else if ('GLUE_PYTHON'==row.glueType) {
return "GLUE模式(Python)";
} else if ('BEAN'==row.glueType) {
return row.executorHandler;
}
return row.executorHandler;
}
},
{ "data": 'executorParam', "visible" : false},