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

This commit is contained in:
xuxueli 2018-09-16 02:40:11 +08:00
parent b30db36033
commit 347306536c
1 changed files with 4 additions and 13 deletions

View File

@ -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