tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Chille <thomas.chi...@gmail.com>
Subject Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
Date Wed, 19 Jan 2005 13:21:46 GMT
On Tue, 21 Dec 2004 20:24:25 -0800, Dwayne Ghant <dghant@temple.edu> wrote:
> The alarm is configured as any other servlet, with the addition of the
> run-at tag. The following configuration runs the servlet every 15
> minutes. If the hour is missing, e.g. :15 the service is run at the
> specified minute.
> 15 minute configuration
> 
> <servlet name='alarm' servlet-class='test.TestAlarm'>
> <run-at>:00, :15, :30, :45</run-at>
> </servlet>

Will be the the RUN-AT-paramter evaluated by Tomcat 5.0x or by anybody else?

I implemeted a small testscenario but get no log-output for the service-method:

...
<servlet>
  <servlet-name>timerTest</servlet-name>
  <servlet-class>de.spoon.report.TimerTestServlet</servlet-class>
  <run-at>:01, :02, :03, :05, :06</run-at>
  <load-on-startup>1</load-on-startup>
</servlet>
...

...
public class TimerTestServlet extends HttpServlet {
  
  private final static Logger logger = Logger.getLogger(TimerTestServlet.class);
	
  public void init(ServletConfig config) throws ServletException {
    super.init(config);
    logger.info("INIT: " + new Date());
  }
	
  public void service(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
		
    logger.info("SERVICE: " + new Date());
   }
}

Did i something wrong?

Regards, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message