Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyuan
byit-myth-job
Commits
8fcd3190
Commit
8fcd3190
authored
Apr 16, 2020
by
guo_minglei@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
立即运行类quartz任务
parent
e4561ec4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
JobUtils.java
...xecutor-plugin/src/main/java/com/byit/utils/JobUtils.java
+17
-0
No files found.
byit-myth-executor/myth-executor-plugin/src/main/java/com/byit/utils/JobUtils.java
View file @
8fcd3190
...
@@ -133,6 +133,11 @@ public class JobUtils {
...
@@ -133,6 +133,11 @@ public class JobUtils {
* 根据taskName获取日志
* 根据taskName获取日志
*/
*/
private
static
final
String
REQUEST_LOADLOG_TASKNAME
=
"api/node/loadLogByTaskName"
;
private
static
final
String
REQUEST_LOADLOG_TASKNAME
=
"api/node/loadLogByTaskName"
;
/**
* 立即运行quartz任务
*/
private
static
final
String
REQUEST_RUN_JAVATASK
=
"api/node/runJavaTask"
;
/**
/**
* 当前项目运行环境 jar file
* 当前项目运行环境 jar file
*/
*/
...
@@ -576,6 +581,18 @@ public class JobUtils {
...
@@ -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(目录)
* 判断当前的运行环境是什么 jar : table of Contents(目录)
* @return jar -->true 目录 -->false
* @return jar -->true 目录 -->false
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment