Hi Paoloc and Mark,
I've been following this topic with interest as I think this is a good opportunity for an EGL topic on implementing the Quartz scheduler (or WAS's built in scheduler should anyone be deploying WAS). We have a pure java custom solution which uses Quartz for nightly batch processing and was created by a 3rd party software integrator. They use Quartz even though they knew it was being deployed on WAS - I'm not sure why they didn't use WAS's scheduler but I suppose they were more comfortable using the open source resources.
It'll be interesting to see if there will be others who might get involved in the discussion now that Quartz has been mentioned at which time a new thread "EGL implementing Quartz" may be in order. I'll try to use my Quartz experience (in pure java) and see if I can make the EGL ExternalType java wrappers, but like Paoloc, I too don't have much experience doing so. I'm hopeful that someone has already done this and can post their work.
As I understand your issue to be that you need to perform a (backup?) task before the user logs back into the application. You also mentioned something about the timing of this had to occur "at a given time every day at the same hour after the server is started." In that I understand that your Tomcat server (or application) is restarted everyday at the same time. It also sounds to me that this task only needs to occur for those users having performed work in the previous day (or since the server was last restarted and this backup task was performed).
I think I'm in agreement with Mark in that you could write the user information and/or parameters to a db2 table. Then when the server reboots and the application starts, an EGL batch job is kicked off which reads the db2 table to identify which users and parameter data needs to be processed. In the meantime your application is in a lock state and users are prevented from starting a new session (i.e. logging into the application). Although, technically speaking, if the batch job is to be performed every time the server/application is started, then a scheduler is not necessary. Instead, the batch job could be added in the application's Web Deployment Descriptor's Servlets and JSP's section. But doing so may require the use of a java wrapper to call the EGL batch program unless it - when generated into java - implements the javax.servlet.http.HttpServlet class.
It would be helpful to learn what your parameters are to understand better what type of processing that is being done.
An alternate consideration given your familiarity with IBM i may to have a DB2 Stored Procedure called from WrkJobScdE on the IBM i. That is, if the work is purely database related.
I will be waiting on the sidelines following this discussion until I have something more of value to offer.
Daron
canutri