This is also totally irrelevant to a Servlet Forum. Asking Java related
questions and tagging on 'from a servlet' is wasting bandwidth. Im sure there
are many excellent Java forums out there. Asking about things like
DB connectivity and Applets is fine but pure Java questions is too much.

Anyway :-

Can you not just keep the program running all the time and simply check the
time? When a certain time comes send the mails. I realise this is somewhat
inefficient but if it was implemented like (pseudocode):

while(true)
{
    check time

    if time is specified time (e.g. 13.00)
    {
        // check db

        // send mails
    }
    else
    {
        sleep for 30 mins
    }
}

You could change the resolution from 30 mins to 5 mins if necessary but it
wouldnt be too inefficient and would be nice and easy to implement.


-Paul



> > ----- Original Message -----
> > From: poornima visvesvaran <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, February 23, 2001 12:54 PM
> > Subject: Automatic Servlet Execution?
> >
> >
> > Hi Friends,
> >
> > I want a servlet to be executed automatically
> > everyday
> > (same time) to check in the database and send mails
> > to
> > some people.
> >
> > Is it possible to run the servlet like mentioned
> > above? If yes, How?
> >
> > Can you please send with details immediately.
> >
> > Thanks in advance.
> >
> > Poornima Visvesvaran.

___________________________________________________________________________
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

Reply via email to