执行器Commandhandler示例任务优化,修复极端情况下脚本进程挂起问题;

master
xueli.xue 4 years ago
parent 00dc9a3e04
commit 78b8eeb492
  1. 4
      doc/XXL-JOB官方文档.md
  2. 8
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/service/jobhandler/SampleXxlJob.java

@ -2061,8 +2061,10 @@ data: post-data
- 15、调度通讯组件优化,修复RestFul方式调用 DotNet 版本执行器时心跳检测失败问题;
- 16、调度中心组件加载顺序优化,修复极端情况下调度组件初始慢导致的调度失败问题;
- 17、执行器注册线程优化,修复极端情况下初始化失败时导致NPE问题;
- 18、[规划中]任务触发参数优化:支持选择 "Cron触发"、"固定间隔时间触发"、"指定时间点触发"、"不选择" 等
- 18、执行器Commandhandler示例任务优化,修复极端情况下脚本进程挂起问题
- 19、[规划中]分片任务:全部完成后才会出发后置节点;
- 20、[规划中]执行器注册,异步写入;
- 21、[规划中]任务触发参数优化:支持选择 "Cron触发"、"固定间隔时间触发"、"指定时间点触发"、"不选择" 等;
### 7.32 版本 v2.3.0 Release Notes[规划中]
- 1、[规划中]DAG流程任务

@ -84,7 +84,13 @@ public class SampleXxlJob {
BufferedReader bufferedReader = null;
try {
// command process
Process process = Runtime.getRuntime().exec(command);
ProcessBuilder processBuilder = new ProcessBuilder();
processBuilder.command(command);
processBuilder.redirectErrorStream(true);
Process process = processBuilder.start();
//Process process = Runtime.getRuntime().exec(command);
BufferedInputStream bufferedInputStream = new BufferedInputStream(process.getInputStream());
bufferedReader = new BufferedReader(new InputStreamReader(bufferedInputStream));

Loading…
Cancel
Save