How to write cron jobs in Java EE?

How to write cron jobs in Java EE?

Could you explain by example?

+5
source share
2 answers

If you are not limited to j2ee and have the ability to use JavaEE 6, see SIMPLE POSSIBLE EJB 3.1 TIMER .

+8
source

Use Quartz . This is the easiest way to do this in Java.

Other methods include JDK ExecutorServiceand Spring TaskExecutorabstraction.

Also, as mentioned in the comments of @RuiMarques : Cron4j

+6
source