vraptor-quartzjob

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Categories

Categories

Quartz Application Layer Libs Job Scheduling
GroupId

GroupId

br.com.caelum.vraptor
ArtifactId

ArtifactId

vraptor-quartzjob
Last Version

Last Version

4.0.8
Release Date

Release Date

Type

Type

jar
Description

Description

vraptor-quartzjob
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Project URL

Project URL

http://github.com/caelum/vraptor-quartzjob
Source Code Management

Source Code Management

http://github.com/caelum/vraptor-quartzjob

Download vraptor-quartzjob

How to add to project

<!-- https://jarcasting.com/artifacts/br.com.caelum.vraptor/vraptor-quartzjob/ -->
<dependency>
    <groupId>br.com.caelum.vraptor</groupId>
    <artifactId>vraptor-quartzjob</artifactId>
    <version>4.0.8</version>
</dependency>
// https://jarcasting.com/artifacts/br.com.caelum.vraptor/vraptor-quartzjob/
implementation 'br.com.caelum.vraptor:vraptor-quartzjob:4.0.8'
// https://jarcasting.com/artifacts/br.com.caelum.vraptor/vraptor-quartzjob/
implementation ("br.com.caelum.vraptor:vraptor-quartzjob:4.0.8")
'br.com.caelum.vraptor:vraptor-quartzjob:jar:4.0.8'
<dependency org="br.com.caelum.vraptor" name="vraptor-quartzjob" rev="4.0.8">
  <artifact name="vraptor-quartzjob" type="jar" />
</dependency>
@Grapes(
@Grab(group='br.com.caelum.vraptor', module='vraptor-quartzjob', version='4.0.8')
)
libraryDependencies += "br.com.caelum.vraptor" % "vraptor-quartzjob" % "4.0.8"
[br.com.caelum.vraptor/vraptor-quartzjob "4.0.8"]

Dependencies

compile (4)

Group / Artifact Type Version
br.com.caelum : vraptor jar 4.2.0-RC3
javax.enterprise : cdi-api jar 1.1
org.quartz-scheduler : quartz jar 2.1.5
commons-httpclient : commons-httpclient jar 3.1

provided (1)

Group / Artifact Type Version
org.mortbay.jetty : servlet-api jar 3.0.20100224

test (2)

Group / Artifact Type Version
junit : junit jar 4.8.2
org.mockito : mockito-core jar 1.8.5

Project Modules

There are no modules declared in this project.

vraptor-quartzjob

A simple quartz scheduler

installing

Vraptor-quartzjob.jar can be downloaded from maven's repository, or configured in any compatible tool:

<dependency>
    <groupId>br.com.caelum.vraptor</groupId>
    <artifactId>vraptor-quartzjob</artifactId>
    <version>4.0.2</version> <!--or the latest version-->
    <scope>compile</scope>
</dependency>

using

You must configure the host of your application in with VRaptor's environment support. So, for example, add to your development.properties de following configuration:

host=http://localhost:8080

For more information about environments, check the VRaptor docs.

To schedule jobs in your application, simply create a controller and implement the CronTask interface:

@Controller
public class MyJob implements CronTask {
    @Override
    public void execute() {
        System.out.println("executing job");
    }

    @Override
    public String frequency() {
        return "*/10 * * * * ?";
    }
}

With this class, vraptor-quartzjob will execute a request to this controller every 10 minutes.

The String returned in frequency method should be a unix-like cron expression used by quartz. This format is well documented with a lot of examples in the quartz documentation: http://www.quartz-scheduler.org/documentation/quartz-2.2.x/tutorials/tutorial-lesson-06

help

Get help from vraptor developers and the community at vraptor mailing list.

br.com.caelum.vraptor

Caelum

Versions

Version
4.0.8
4.0.7
4.0.6
4.0.5
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0.Final
4.0.0-RC2
1.0.9
1.0.8
1.0.6
1.0.4
1.0.3
1.0.2
1.0.0