@Singleton public class JobRunner extends Object
JobRunner
controls the scheduler.Scheduler
from the job configuration provided from the database. It
also provides some public methods to start/restart/stop the scheduler.Constructor and Description |
---|
JobRunner(org.quartz.Scheduler scheduler) |
Modifier and Type | Method and Description |
---|---|
boolean |
isEnabled() |
void |
onRemove(com.axelor.events.PreRequest event) |
void |
restart()
Reconfigure the scheduler and restart.
|
void |
start()
Start the scheduler.
|
void |
stop()
Stop the scheduler.
|
void |
update(MetaSchedule meta)
Update the given scheduler.
|
@Inject public JobRunner(org.quartz.Scheduler scheduler)
public boolean isEnabled()
public void update(MetaSchedule meta) throws org.quartz.SchedulerException
meta
- org.quartz.SchedulerException
public void start()
public void stop()
public void restart()
public void onRemove(@Named(value="remove") @EntityType(value=MetaSchedule.class) com.axelor.events.PreRequest event)