1.10.2.2. Samples

1.10.2.2.1. Defining a job
1.10.2.2.2. Job configuration
1.10.2.2.3. Running the project

Note

You can download the project code from here

Work with JobSchedulerService by creating a sample project and use GateIn-3.1.0-GA for testing.

Firstly, create a project by using maven archetype plugin:

mvn archetype:generate

Edit the pom.xml as follows:


<project
  xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <artifactId>exo.portal.parent</artifactId>
    <groupId>org.exoplatform.portal</groupId>
    <version>3.1.0-GA</version>
  </parent>

  <groupId>org.exoplatform.samples</groupId>
  <artifactId>exo.samples.scheduler</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <name>eXo Samples For Scheduler</name>
  <description>eXo Samples Code For Scheduler</description>
</project>    

Generate an eclipse project by using maven eclipse plugin and then import into eclipse:

mvn eclipse:eclipse

eXo Kernel makes it easier to work with Job Scheduler service. All you need is just to define your "job" class to be performed by implementing org.quartz.Job interface and add configuration for it.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus