com.xiaoleilu.hutool.cron.TaskLauncher Maven / Gradle / Ivy
The newest version!
package com.xiaoleilu.hutool.cron;
/**
* 作业启动器
* 负责检查TaskTable是否有匹配到此时运行的Task
* 检查完毕后启动器结束
*
* @author Looly
*
*/
public class TaskLauncher extends Thread{
private Scheduler scheduler;
private long millis;
public TaskLauncher(Scheduler scheduler, long millis) {
this.scheduler = scheduler;
this.millis = millis;
}
@Override
public void run() {
//匹配秒部分由用户定义决定,始终不匹配年
scheduler.taskTable.executeTaskIfMatchInternal(millis);
//结束通知
scheduler.taskLauncherManager.notifyLauncherCompleted(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy