Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
31f4bc85
Commit
31f4bc85
authored
Nov 17, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重做添加定时器报错解决
parent
76b3bdb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
QuartzManager.java
...in/java/com/yeejoin/amos/patrol/quartz/QuartzManager.java
+9
-4
No files found.
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/quartz/QuartzManager.java
View file @
31f4bc85
...
@@ -32,10 +32,15 @@ public class QuartzManager {
...
@@ -32,10 +32,15 @@ public class QuartzManager {
.
withIdentity
(
jobName
,
TRIGGER_GROUP_NAME
)
//给触发器起一个名字和组名
.
withIdentity
(
jobName
,
TRIGGER_GROUP_NAME
)
//给触发器起一个名字和组名
.
withSchedule
(
CronScheduleBuilder
.
cronSchedule
(
time
))
.
withSchedule
(
CronScheduleBuilder
.
cronSchedule
(
time
))
.
build
();
.
build
();
sched
.
scheduleJob
(
jobDetail
,
trigger
);
if
(!
sched
.
checkExists
(
jobDetail
.
getKey
()))
{
if
(!
sched
.
isShutdown
())
{
sched
.
scheduleJob
(
jobDetail
,
trigger
);
sched
.
start
();
// 启动
if
(!
sched
.
isShutdown
())
{
}
sched
.
start
();
// 启动
}
System
.
out
.
println
(
"定时器添加成功========="
);
}
else
{
System
.
out
.
println
(
"定时器已存在========="
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
...
...
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