On Tue, 7 Sep 1999, Duke Martin wrote:
> hi,
>
> I developed a servlet that sends and receives email using JavaMail.
> My question is how can I set up my servlet to automatically call my
> "Receive" method every 5 minutes? Or can I just reload the servlet
> every 5 minutes? Is this possible? If so, what is the best way.
You can start a thread that sleeps for five minutes, and then does
what you want it to do (in a loop, that is). I'm doing something like
this in one of my servlets.
Of course, as per some previous discussion on this list, you don't
necessarily want to be using servlets as a replacement for cron.
Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html