1.10.1.2. Samples

1.10.1.2.1. Defining a job
1.10.1.2.2. Job configuration

Follow this to write a simple and complete job.

Create a Maven project that contains:

Here is the pom.xml:


<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.acme.samples</groupId>
    <artifactId>dumb-job</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <dependencies>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <version>2.1.7</version>
            <scope>provided</scope>
        </dependency>
        <!-- You need this dependency because you'll use eXo Log -->
        <dependency>
            <groupId>org.exoplatform.kernel</groupId>
            <artifactId>exo.kernel.commons</artifactId>
            <version>2.4.13-GA</version>
        </dependency>
    </dependencies>
    <build>
        <finalName>dumb-job</finalName>
    </build>
</project>

eXo Kernel makes it easier to work with Job Scheduler service. All you need is to define your Job implementation and add configuration for it.

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