Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 61408 invoked from network); 5 Oct 2002 10:53:59 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 5 Oct 2002 10:53:59 -0000 Received: (qmail 22017 invoked by uid 97); 5 Oct 2002 10:54:25 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 21992 invoked by uid 97); 5 Oct 2002 10:54:24 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 21977 invoked by uid 98); 5 Oct 2002 10:54:23 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: Malachi de AElfweald To: Tomcat Users List Date: Sat, 05 Oct 2002 03:53:39 -0700 X-Priority: 3 (Normal) Reply-To: malachi@tremerechantry.com In-Reply-To: <3D9EC35F.2050601@ev.co.yu> Message-Id: Subject: Re: I need to run a servlet periodically MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Mailer: Opera 6.05 build 1140 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Unless you are just trying to do refresh, in which case you could use the meta-tags to do auto-refresh and server-push. If you were trying to do a servlet that managed something always running, then you would want a daemon that could handle live-updates. Please be more clear on the usage. Malachi 10/5/2002 3:47:59 AM, Nikola Milutinovic wrote: >Filip Rachunek wrote: > >> Hello, >> is it possible to have a servlet in Tomcat container >> which is invoked automatically each gived time period? >> [e.g. each 10 minutes] And I would also need this >> special servlet to access other resources of my web >> application [connection pool, ...]. > >You're making a mistake. A Java Servlet is a Java component that responds to a >web request. That's it - nothing more, nothing less, just what it is designed for. > >It is not designed to be a "cron job". Something like that doesn't belong to a >web application - or should we say, to the web GUI part of a web application. In >a full JEE application which has a web portal (like Tomcat), you would place >such a "cron job" somewhere other than a web interface. I'm not sure where, I'm >no expert on JEE (yet). > >This was like asking "can CGI script be configured to run at regular >intervals?". Of course you could run a cron job that would act as a web client >and send a request that would fire up that CGI or Servlet. But that is going >slightly around it. And doing it at the wrong point. > >Web applications are request driven application and should not be twisted into >something unnatural. Use a regular cron job for this. > >Nix. > > >-- >To unsubscribe, e-mail: >For additional commands, e-mail: > > > -- To unsubscribe, e-mail: For additional commands, e-mail: