# ${I18n.admin_name}

<#import "../common/common.macro.ftl" as netCommon> <@netCommon.commonStyle />
sidebar-collapse">
<@netCommon.commonHeader /> <@netCommon.commonLeft "jobinfo" />

# ${I18n.jobinfo_name}

${I18n.jobinfo_field_jobgroup}
<#--

### 调度列表

-->

${I18n.jobinfo_field_id} | ${I18n.jobinfo_field_jobgroup} | ${I18n.jobinfo_field_jobdesc} | ${I18n.jobinfo_field_gluetype} | ${I18n.jobinfo_field_executorparam} | Cron | addTime | updateTime | ${I18n.jobinfo_field_author} | ${I18n.jobinfo_field_alarmemail} | ${I18n.system_status} | ${I18n.system_opt}
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---

<@netCommon.commonFooter />

#### ${I18n.jobinfo_field_add}

${I18n.jobinfo_field_jobgroup}*
${I18n.jobinfo_field_jobdesc}*
${I18n.jobinfo_field_executorRouteStrategy}*
Cron*
${I18n.jobinfo_field_gluetype}*
JobHandler*
${I18n.jobinfo_field_executorBlockStrategy}*
${I18n.jobinfo_field_childJobId}*
${I18n.jobinfo_field_timeout}*
${I18n.jobinfo_field_executorFailRetryCount}*
${I18n.jobinfo_field_author}*
${I18n.jobinfo_field_alarmemail}*
${I18n.jobinfo_field_executorparam}*

package com.xxl.job.service.handler; import com.xxl.job.core.log.XxlJobLogger; import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.handler.IJobHandler; public class DemoGlueJobHandler extends IJobHandler { @Override public ReturnT<String> execute(String param) throws Exception { XxlJobLogger.log("XXL-JOB, Hello World."); return ReturnT.SUCCESS; } } #!/bin/bash echo "xxl-job: hello shell" echo "${I18n.jobinfo_script_location}：$0" echo "${I18n.jobinfo_field_executorparam}：$1" echo "${I18n.jobinfo_shard_index} = $2" echo "${I18n.jobinfo_shard_total} = $3" <#--echo "参数数量：$#" for param in $* do echo "参数 : $param" sleep 1s done--> echo "Good bye!" exit 0 #!/usr/bin/python # -*- coding: UTF-8 -*- import time import sys print "xxl-job: hello python" print "${I18n.jobinfo_script_location}：", sys.argv[0] print "${I18n.jobinfo_field_executorparam}：", sys.argv[1] print "${I18n.jobinfo_shard_index}：", sys.argv[2] print "${I18n.jobinfo_shard_total}：", sys.argv[3] <#--for i in range(1, len(sys.argv)): time.sleep(1) print "参数", i, sys.argv[i]--> print "Good bye!" exit(0) <#-- import logging logging.basicConfig(level=logging.DEBUG) logging.info("脚本文件：" + sys.argv[0]) --> <#--这里有问题，新建一个运行模式为 php 的任务后，GLUE 中没有下边的 php 代码--> <?php echo "xxl-job: hello php \n"; echo "${I18n.jobinfo_script_location}：$argv[0] \n"; echo "${I18n.jobinfo_field_executorparam}：$argv[1] \n"; echo "${I18n.jobinfo_shard_index} = $argv[2] \n"; echo "${I18n.jobinfo_shard_total} = $argv[3] \n"; echo "Good bye! \n"; exit(0); ?> #!/usr/bin/env node console.log("xxl-job: hello nodejs") var arguments = process.argv console.log("${I18n.jobinfo_script_location}: " + arguments[1]) console.log("${I18n.jobinfo_field_executorparam}: " + arguments[2]) console.log("${I18n.jobinfo_shard_index}: " + arguments[3]) console.log("${I18n.jobinfo_shard_total}: " + arguments[4]) <#--for (var i = 2; i < arguments.length; i++){ console.log("参数 %s = %s", (i-1), arguments[i]); }--> console.log("Good bye!") process.exit(0) Write-Host "xxl-job: hello powershell" Write-Host "${I18n.jobinfo_script_location}: " $MyInvocation.MyCommand.Definition Write-Host "${I18n.jobinfo_field_executorparam}: " if ($args.Count -gt 2) { $args[0..($args.Count-3)] } Write-Host "${I18n.jobinfo_shard_index}: " $args[$args.Count-2] Write-Host "${I18n.jobinfo_shard_total}: " $args[$args.Count-1] Write-Host "Good bye!" exit 0

#### ${I18n.jobinfo_field_update}

${I18n.jobinfo_field_jobgroup}*
${I18n.jobinfo_field_jobdesc}*
${I18n.jobinfo_field_executorRouteStrategy}*
Cron*
${I18n.jobinfo_field_gluetype}*
JobHandler*
${I18n.jobinfo_field_executorBlockStrategy}*
${I18n.jobinfo_field_childJobId}*
${I18n.jobinfo_field_timeout}*
${I18n.jobinfo_field_executorFailRetryCount}*
${I18n.jobinfo_field_author}*
${I18n.jobinfo_field_alarmemail}*
${I18n.jobinfo_field_executorparam}*

<#-- trigger -->

#### ${I18n.jobinfo_opt_run}

${I18n.jobinfo_field_executorparam}*
${I18n.jobgroup_field_registryList}*

<@netCommon.commonScript />
<#-- cronGen -->