For periodic tasks in servlets I use Maintenance package from :

http://www.coolservlets.com/Maintenance/index.html

It runs a new thread which wakes up periodically in selected
intervals. It has the advantage over "cron" solution
that your servlet and the periodic tasks are started
and controlled form one point.

"Craig R. McClanahan" wrote:
>
> MA wrote:
>
> > Hello Guys:
> > I'm trying to implement servlet invocation after
> > certain time period automatically.
> > The servlet will connect to a database, retrieve the
> > data and then download it into a flat file. I want
> > this process to be repeated after every 30 minutes.
> > Any brain dump or pointers about how to implement this
> > is appreciated.
> >
>
> >From the description given, it is not at all obvious why this should be servlet
> based.  It would seem to me you could write a standard Java application to
> create the file when it is executed, and then schedule when it is run with the
> standard job scheduling facilities of your underlying operating system
> ("crontab" for Unix systems, or whatever the equivalent is for NT).
>
> If the file generator really needs to be a servlet for some reason, you can
> still accomplish your goal by writing a simple Java client application that
> uses a URLConnection to invoke your servlet.  Schedule this client application
> to run every thirty minutes using the job scheduling facilities of your OS.
>
> >
> > Thanks,
> > Mub
> >
>
> Craig McClanahan
>
> ___________________________________________________________________________
> 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


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   INET, a.s.                          Mgr. Martin Kuba
Kralovopolska 139                  e-mail: [EMAIL PROTECTED]
  601 12 Brno                      WWW: http://www.inet.cz/~makub/
 Czech Republic                    tel: +420-5-41242414/32
--------------------------------------------------------------------

___________________________________________________________________________
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