소스 검색

新增任务运行模式 "GLUE模式(PowerShell) ",支持PowerShell脚本任务;

xuxueli 7 년 전
부모
커밋
347306536c
1개의 변경된 파일4개의 추가작업 그리고 13개의 파일을 삭제
  1. 4 13
      xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl

+ 4 - 13
xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl

@@ -272,20 +272,11 @@ process.exit(0)
 <textarea class="glueSource_powershell" style="display:none;" >
 Write-Host "xxl-job: hello powershell"
 
-if($args.Count -eq 3) {
-	$executorparam = $args[0]
-	$shard_index = $args[1]
-	$shard_total = $args[2]
-} Else {
-	$executorparam = ""
-	$shard_index = $args[0]
-	$shard_total = $args[1]
-}
-
 Write-Host "${I18n.jobinfo_script_location}: " $MyInvocation.MyCommand.Definition
-Write-Host "${I18n.jobinfo_field_executorparam}: " $executorparam
-Write-Host "${I18n.jobinfo_shard_index}: " $shard_index
-Write-Host "${I18n.jobinfo_shard_total}: " $shard_total
+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