|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.module.scheduler.SchedulerModule
public class SchedulerModule
Scheduler module. Under the node jobs one can create jobs by defining the command to use. The scheduling is done based on a cron syntax scheduling expression. The job definition can contain a params node which can hold values passed to the command in the execution-context.
Field Summary | |
---|---|
protected org.quartz.Scheduler |
scheduler
The quartz scheduler. |
Constructor Summary | |
---|---|
SchedulerModule()
|
Method Summary | |
---|---|
void |
addJob(JobDefinition job)
|
protected String |
cronToQuarzCron(String cron)
|
static SchedulerModule |
getInstance()
Deprecated. since 2.0.1. Please, use IoC instead. |
List<JobDefinition> |
getJobs()
|
org.quartz.Scheduler |
getScheduler()
If you need to get the scheduler handled by the module. |
protected void |
initJob(JobDefinition job)
Initialize a single job. |
protected void |
initJobs()
Add all the jobs defined in the jobs node. |
protected void |
initScheduler()
Start the scheduler. |
void |
setJobs(List<JobDefinition> jobs)
|
void |
start(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
Start scheduler and add jobs. |
protected void |
startJob(JobDefinition job)
|
void |
stop(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
Stops the scheduler. |
void |
stopJob(String name)
Deletes the job safely. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.quartz.Scheduler scheduler
Constructor Detail |
---|
public SchedulerModule()
Method Detail |
---|
public List<JobDefinition> getJobs()
public void setJobs(List<JobDefinition> jobs) throws org.quartz.SchedulerException
org.quartz.SchedulerException
public void addJob(JobDefinition job) throws org.quartz.SchedulerException
org.quartz.SchedulerException
public void stop(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
stop
in interface info.magnolia.module.ModuleLifecycle
public void start(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
start
in interface info.magnolia.module.ModuleLifecycle
protected void initJobs()
protected void initJob(JobDefinition job) throws org.quartz.SchedulerException
org.quartz.SchedulerException
protected void startJob(JobDefinition job) throws org.quartz.SchedulerException
org.quartz.SchedulerException
protected String cronToQuarzCron(String cron)
public void stopJob(String name) throws org.quartz.SchedulerException
org.quartz.SchedulerException
protected void initScheduler() throws org.quartz.SchedulerException
org.quartz.SchedulerException
public org.quartz.Scheduler getScheduler()
public static SchedulerModule getInstance()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |