Hi, you may define some thread to be started while the app init process. Works nicely for us.
Two classes are required. 1. Simple init servlet that will be plugged into web.xml (similar to the way that struts action servlet is plugged) In the 'init' method you could start your thread daemon. You could also pass some parameters this way. Stop the thread in the 'destroy' method. Because this solution works with threads, I would advise to put some flag there if it has already been started or not, to make sure there is only 1 instance of your thread. 2. The thread class. It could be parametrized (see above), for example JNDI resource name for database, interval, etc ... We sceptic about such solution, but it really works nicely when we tried it. Another solution. You could create some servlet that does cleanup job, and periodically call it with cron. I would advise 'curl' as your http client - works on Unixes and Windows. It's very nice, free, single file program. That solution is platform dependent, ie. different way of configuring cron, and different versions of your http client are required. Is anybody using different solution? Darek Thursday, September 26, 2002, 11:54:27 AM, you wrote: g> Hi! g> In my struts app I have to do some cleanup jobs in my database that I g> like to start regularly. What's the best way to realize such schedules g> jobs in a struts app? g> Thanks in advance. g> gus -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

