@Component
public class ScheduledTask
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
ID |
protected org.apache.commons.logging.Log |
log |
private LogTaskService |
logTaskService |
static java.lang.String |
RUNONCE_FLAG |
private org.quartz.Scheduler |
scheduler |
private SysTaskService |
service |
private SysSiteService |
siteService |
static int |
TASK_STATUS_ERROR |
static int |
TASK_STATUS_PAUSE |
static int |
TASK_STATUS_READY |
static int |
TASK_STATUS_RUNNING |
构造器和说明 |
---|
ScheduledTask() |
限定符和类型 | 方法和说明 |
---|---|
void |
create(SysSite site,
java.lang.Integer id,
java.lang.String cronExpression)
创建任务计划
|
void |
dealNotEndTask(java.util.Date startDate) |
void |
delete(java.lang.Integer id)
删除任务计划
|
void |
destroy() |
java.lang.String |
getTaskName(java.lang.Integer id)
任务计划名称
|
void |
init(java.util.Date startDate) |
void |
interrupt(SysSite site,
java.lang.Integer id)
打断任务计划
|
void |
pause(SysSite site,
java.lang.Integer id)
暂停任务计划
|
void |
resume(SysSite site,
java.lang.Integer id)
恢复任务计划
|
void |
runOnce(SysSite site,
java.lang.Integer id)
执行任务计划
|
protected final org.apache.commons.logging.Log log
public static final java.lang.String ID
public static final java.lang.String RUNONCE_FLAG
public static final int TASK_STATUS_READY
public static final int TASK_STATUS_RUNNING
public static final int TASK_STATUS_PAUSE
public static final int TASK_STATUS_ERROR
private SysTaskService service
@Autowired(required=false) private org.quartz.Scheduler scheduler
private LogTaskService logTaskService
private SysSiteService siteService
public void init(java.util.Date startDate)
startDate
- public void dealNotEndTask(java.util.Date startDate)
public void create(SysSite site, java.lang.Integer id, java.lang.String cronExpression)
site
- id
- cronExpression
- public void runOnce(SysSite site, java.lang.Integer id)
site
- id
- public void pause(SysSite site, java.lang.Integer id)
site
- id
- public void interrupt(SysSite site, java.lang.Integer id)
site
- id
- public void resume(SysSite site, java.lang.Integer id)
site
- id
- public void delete(java.lang.Integer id)
id
- public java.lang.String getTaskName(java.lang.Integer id)
id
- @PreDestroy public void destroy()