Scheduler Web Application

Generic web application that can make http calls on a schedule defined using Quartz.

License

License

GroupId

GroupId

nl.hsac
ArtifactId

ArtifactId

hsac-scheduler
Last Version

Last Version

1.4.1
Release Date

Release Date

Type

Type

war
Description

Description

Scheduler Web Application
Generic web application that can make http calls on a schedule defined using Quartz.
Project URL

Project URL

https://github.com/fhoeben/hsac-scheduler
Source Code Management

Source Code Management

https://github.com/fhoeben/hsac-scheduler.git

Download hsac-scheduler

How to add to project

<!-- https://jarcasting.com/artifacts/nl.hsac/hsac-scheduler/ -->
<dependency>
    <groupId>nl.hsac</groupId>
    <artifactId>hsac-scheduler</artifactId>
    <version>1.4.1</version>
    <type>war</type>
</dependency>
// https://jarcasting.com/artifacts/nl.hsac/hsac-scheduler/
implementation 'nl.hsac:hsac-scheduler:1.4.1'
// https://jarcasting.com/artifacts/nl.hsac/hsac-scheduler/
implementation ("nl.hsac:hsac-scheduler:1.4.1")
'nl.hsac:hsac-scheduler:war:1.4.1'
<dependency org="nl.hsac" name="hsac-scheduler" rev="1.4.1">
  <artifact name="hsac-scheduler" type="war" />
</dependency>
@Grapes(
@Grab(group='nl.hsac', module='hsac-scheduler', version='1.4.1')
)
libraryDependencies += "nl.hsac" % "hsac-scheduler" % "1.4.1"
[nl.hsac/hsac-scheduler "1.4.1"]

Dependencies

compile (4)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.2.3
org.quartz-scheduler : quartz jar 2.3.2
org.quartz-scheduler : quartz-jobs jar 2.3.2
org.apache.httpcomponents : httpclient jar 4.5.10

provided (1)

Group / Artifact Type Version
javax : javaee-web-api jar 7.0

Project Modules

There are no modules declared in this project.

HSAC-scheduler

Maven Central

Sample/boilerplate web application using Quartz scheduler. It allows you to configure a set of http calls to made according to a schedule.

The calls to make and their schedule are configured in an XML file src/main/resources/jobs.xml using the standard Quartz format.

Http Calls

The http calls to be made can be:

  • GET
  • POST with body in jobs.xml
  • POST with body from file
  • PUT with body in jobs.xml
  • PUT with body from file

Http calls are made using Apache http client, default timeouts and connection management are configured in scheduler.properties. The timeouts can be overridden on a per job basis.

Job Status

The status of the jobs (what was the result of last http call) and when their next invocation is planned can be accessed via '<app_url>/statusCheck'.

Logging

The application log can be accessed via '<app_url>/logs/log'. The log levels can be controlled on a per job(-group) basis (each job has its own logger: nl.hsac.scheduler.jobs.<job-group>.<job>). The job/trigger details are made available as MDC variables. Logging is configured by updating logback.xml (see logback's configuration manual).

Running

To run the scheduler, deploy the 'WAR' to a Java servlet engine (e.g. Jetty or Tomcat).

The easiest way to run the scheduler (after cloning) is via Maven using mvn jetty:run, which will start a Jetty instance (listening on port 8080) running the scheduler. It can then be accessed on http://localhost:8080/.

Running as Docker Container

The scheduler can also be run as docker container using image hsac/scheduler:<version>. The configuration can then be overridden by overwriting the config files (the same as present in src/main/resources) in /jetty/webapps/ROOT/WEB-INF/classes.

Versions

Version
1.4.1
1.4.0
1.3.1