CDI Cron
A CDI extension to schedule jobs as easy as Unix cron
Usage
Java Maven Dependency available from Central Repository:
<dependency>
<groupId>de.mirkosertic.cdicron</groupId>
<artifactId>cdi-cron-quartz-scheduler</artifactId>
<version>1.1</version>
</dependency>
Example Java Code
import de.mirkosertic.cdicron.api.Cron;
@Singleton
public class DummyJob {
public static final AtomicLong COUNTER = new AtomicLong(0);
@Cron(cronExpression = "0/2 * * * * ?")
public void scheduledMethod() {
COUNTER.incrementAndGet();
}
}