Why are you writing a servlet for this? If the application does not use any of the services confined to the Servlet API and Tomcat, just write a stand-alone application and setup up a cron job to run it. Seems like overkill to me.
On Tue, 21 Dec 2004 16:28:49 -0000, Allistair Crossley <[EMAIL PROTECTED]> wrote: > no, and I believe doing so it bad practice. use some OS controlled timer like > cron to issue a HTTP call to your servlet. I once wrote a shell script that > calls a http address on the local machine but cannot remember how ;) if you > are using oracle then you can setup this timer thread inside the database > itself. don't add a thread into your web application. > > > -----Original Message----- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: 21 December 2004 16:14 > > To: Tomcat Users List > > Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30 > > > > > > Thanks for the reply... > > > > The application which i am trying to write is a standalone > > utility.. Client > > does not hit this servlet. > > > > Instead my application which is a servlet, will make some > > database calls-- > > and if the required data is present in the database, then > > that data is sent > > to the client via xmlrpc call and the response from the xmlrpc call is > > updated back into the dataabse. > > > > So we want this utility preferably servlet in our Tomcat > > container to be run > > every 30 minutes like a cron job, to do the database updates.. > > > > There are so many other classes deployed on Tomcat and i want > > to use those > > classes to write this servlet utility. > > This is the reason why chose to use servlet, but is there any > > configurable > > parameter to run servlet for every 30 minutes... > > > > -----Original Message----- > > From: Wade Chandler [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, December 21, 2004 11:03 AM > > To: Tomcat Users List > > Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30 > > > > > > Shilpa Nalgonda wrote: > > > Hi, > > > I am using Tomcat4.1.30 version. > > > I have to develop a client application which looks in the > > database every > > 30 > > > minutes, > > > to retrieve the status of an order and send the status to the remote > > client. > > > Again waits for the > > > The client's response and insert the repsonse back to the database. > > > > > > I wanted to do this in a servlet, so is there any way that > > i could run > > this > > > servlet automatically inside the > > > Tomcat container, or is it configurable in servlet mapping? > > if so can > > > someone please suggest me with examples... > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > Well....it's kind of not extremely clear what you are asking, but why > > does the servlet need to do anything except listen for a > > client which is > > threaded to do this every 30 minutes, in other words...why > > not have the > > servlet do what it naturally does...sit there and get hit by client > > requests....get the info....and send it back? I mean...the servlet > > can't push to the client unless you want to use something > > besides http, > > or unless you are using servlets on both ends and http servers on both > > ends. You could use keep alives I guess.....I wouldn't though....only > > so many tcp/ip connections. > > > > Wade > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> > ------------------------------------------------------- > QAS Ltd. > Developers of QuickAddress Software > <a href="http://www.qas.com">www.qas.com</a> > Registered in England: No 2582055 > Registered in Australia: No 082 851 474 > ------------------------------------------------------- > </FONT> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]