tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dwayne Ghant <dgh...@temple.edu>
Subject Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
Date Wed, 22 Dec 2004 04:05:54 GMT
Have fun I hope this helps!!! It should.

<web-app id='/'>

<servlet servlet-name='hello'
         servlet-class='test.HelloWorld'>
  <load-on-startup/>
</servlet>

</web-app>

The value is a list of 24-hour times when the servlet should be 
automatically executed. To run the servlet every 6 hours, you could use:


<servlet servlet-name='test.HelloWorld'>
  <run-at>0:00, 6:00, 12:00, 18:00</run-at>
</servlet>



Frank W. Zammetti wrote:

> Your just lending weight to what I said... Don't play with threads in 
> a servlet contain unless your really sure you have to and are really 
> sure you can do it safely :)
>
> (I'm not sure I knew init() could be called more than once, certainly 
> I didn't remember when I wrote that, so excellent point)
>


-- 

Dwayne A. Ghant
Application Developer
Temple University
215.204.5555
dghant@temple.edu

 


---------------------------------------------------------------------
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