How to create web-app with Quartz Scheduler and logging

About Zemian Deng

I sometimes help out users in Quartz Scheduler forums. Once in a while some one would ask how can he/she setup the Quartz inside a web application. This is actualy a fairly simple thing to do. The library already comes with a ServletContextListener that you can use to start a Scheduler. I will show you a simple webapp example here.

First create a Maven pom.xml file.
 
 
 
 
 

<?xml version="1.0" encoding="UTF-8"?><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>    <groupId>quartz-web-demo</groupId>    <artifactId>quartz-web-demo</artifactId>    <packaging>war</packaging>    <version>1.0-SANPSHOT</version>    <dependencies>        <dependency>            <groupId>org.quartz-scheduler</groupId>            <artifactId>quartz</artifactId>            <version>2.2.0</version>        </dependency>    </dependencies></project>

Source : http://www.javacodegeeks.com/2013/09/how-to-create-web-app-with-quartz-scheduler-and-logging.html

Back to Top