@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 |
restart()
Reconfigure the scheduler and restart.
|
void |
start()
Start the scheduler.
|
void |
stop()
Stop the scheduler.
|
void |
validate(String cron)
Validate the given cron string.
|
@Inject public JobRunner(org.quartz.Scheduler scheduler)
public boolean isEnabled()
public void validate(String cron)
cron
- the cron string to validatepublic void start()
public void stop()
public void restart()