How to write cron jobs in Java EE?
Could you explain by example?
If you are not limited to j2ee and have the ability to use JavaEE 6, see SIMPLE POSSIBLE EJB 3.1 TIMER .
Use Quartz . This is the easiest way to do this in Java.
Other methods include JDK ExecutorServiceand Spring TaskExecutorabstraction.
ExecutorService
TaskExecutor
Also, as mentioned in the comments of @RuiMarques : Cron4j