My employer just asked me to run a timed batch process in a Java EE WebSphere application they have running. It's supposed to run a certain class at 11:30 pm everyday.
I'm not very familiar with Java EE nor WebSphere server (or tomcat, in the development environment), and I've been digging around but all I've found is about the java timer class but not how to set it or invoke it.
It seems that editing the web.xml file is required as well.
Any help will be appreciated!
EJB 3.1 will have improved timer services, as well as application lifecycle hooks that remove the need to use servlets to start tasks without user interaction.
This may answer the question title, but for the "real" question concerning a legacy application (written more than 6 months ago ;)) running on websphere I'd recommend to go with the start-up servlet and the EJB timer service.
Timer Service in J2EE 1.4 (EJB 2.1)
For EJB 3.0 (and 3.1 as soon as available), there are some nice annotations ;)
I'd not introduce another library unless you REALLY need it. The timer service should suffice for performing an arbitrary job on a daily basis.
HTH,
Martin