Kernel leverages Quartz for its Scheduler service and wraps
org.quartz.Scheduler
in org.exoplatform.services.scheduler.impl.QuartzScheduler
for easier service wiring and configuration like any other services.
To work with Quartz in Kernel, you will mostly work with
org.exoplatform.services.scheduler.JobSchedulerService
(implemented by org.exoplatform.services.scheduler.impl.JobSchedulerServiceImpl
).
To use JobSchedulerService
, you can configure it as a component in configuration.xml
.
Because JobSchedulerService
requires QuartzScheduler
and
QueueTasks
, you also have to configure these two components.
<?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">
<component>
<type>org.exoplatform.services.scheduler.impl.QuartzSheduler</type>
</component>
<component>
<type>org.exoplatform.services.scheduler.QueueTasks</type>
</component>
<component>
<key>org.exoplatform.services.scheduler.JobSchedulerService</key>
<type>org.exoplatform.services.scheduler.impl.JobSchedulerServiceImpl</type>
</component>
</configuration>