tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Rhoden <ja...@rhoden.id.au>
Subject Re: how to make a scheduled event on tomcat
Date Fri, 02 Feb 2007 00:03:53 GMT
Christopher Schultz wrote:
> Gaurav Kushwaha wrote:
>   
>> I would like to have a method that will run every-so-often. Lets say
>> once in 2 weeks. How do I do that in Tomcat?
>>     
>
> You're better off not using Tomcat for this kind of thing. That's what
> cron and other system software packages are for.
>   
I am curious, I find that moving the cron activities into the war file, 
simplifies greatly the task of deployment and maintenance, why would you 
not  do  it this way?

But to answer the original question,  you need to  design your 
application to start a thread when the application starts up, this 
thread does something every two weeks, and make sure when the 
application is shut down the thread is also shut down or you will have 
lots of grief.

Best Regards,
Jacob

-- 
_________________________________________________
Jacob Rhoden
Application Architect
Systems Development and Integration
University of Melbourne

Phone: +61 3 8344 2884



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message