Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
79279050
authored
Nov 13, 2019
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update document
parent
aebb7b73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobScheduleHelper.java
xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobScheduleHelper.java
View file @
79279050
...
...
@@ -88,20 +88,15 @@ public class JobScheduleHelper {
}
else
if
(
nowTime
>
jobInfo
.
getTriggerNextTime
())
{
// 2.2、trigger-expire < 5s:direct-trigger && make next-trigger-time
CronExpression
cronExpression
=
new
CronExpression
(
jobInfo
.
getJobCron
());
long
nextTime
=
cronExpression
.
getNextValidTimeAfter
(
new
Date
()).
getTime
();
// 1、trigger
JobTriggerPoolHelper
.
trigger
(
jobInfo
.
getId
(),
TriggerTypeEnum
.
CRON
,
-
1
,
null
,
null
);
logger
.
debug
(
">>>>>>>>>>> xxl-job, shecule push trigger : jobId = "
+
jobInfo
.
getId
()
);
// 2、fresh next
jobInfo
.
setTriggerLastTime
(
jobInfo
.
getTriggerNextTime
());
jobInfo
.
setTriggerNextTime
(
nextTime
);
refreshNextValidTime
(
jobInfo
,
new
Date
(
jobInfo
.
getTriggerNextTime
()));
// next-trigger-time in 5s, pre-read again
if
(
jobInfo
.
getTrigger
NextTime
()
-
nowTime
<
PRE_READ_MS
)
{
if
(
jobInfo
.
getTrigger
Status
()==
1
&&
nowTime
+
PRE_READ_MS
>
jobInfo
.
getTriggerNextTime
()
)
{
// 1、make ring second
int
ringSecond
=
(
int
)((
jobInfo
.
getTriggerNextTime
()/
1000
)%
60
);
...
...
xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
View file @
79279050
...
...
@@ -212,7 +212,7 @@
SELECT
<include
refid=
"Base_Column_List"
/>
FROM xxl_job_info AS t
WHERE t.trigger_status = 1
and t.trigger_next_time
<![CDATA[ <= ]]>
#{maxNextTime}
and t.trigger_next_time
<![CDATA[ <= ]]>
#{maxNextTime}
</select>
<update
id=
"scheduleUpdate"
parameterType=
"com.xxl.job.admin.core.model.XxlJobInfo"
>
...
...
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