Commit 8fcd3190 by guo_minglei@163.com

立即运行类quartz任务

parent e4561ec4
......@@ -133,6 +133,11 @@ public class JobUtils {
* 根据taskName获取日志
*/
private static final String REQUEST_LOADLOG_TASKNAME = "api/node/loadLogByTaskName";
/**
* 立即运行quartz任务
*/
private static final String REQUEST_RUN_JAVATASK = "api/node/runJavaTask";
/**
* 当前项目运行环境 jar file
*/
......@@ -576,6 +581,18 @@ public class JobUtils {
}
/**
* 立即运行quartz任务
* @param jobName
* @return
*/
public static ResponseResult runJavaTask(String jobName){
log.info("-------------立即运行quartz任务----------------------");
String response = createHttpRequest(REQUEST_RUN_JAVATASK, "jobName=" + jobName);
log.info("--------------------立即运行quartz任务,结果为:{}------------------------",response);
return JSON.parseObject(response, ResponseResult.class);
}
/**
* 判断当前的运行环境是什么 jar : table of Contents(目录)
* @return jar -->true 目录 -->false
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment