tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexis LESAGE" <alexis.les...@atosorigin.com>
Subject Re: Running Scheduled Task in Tomcat
Date Wed, 07 Nov 2001 15:11:25 GMT
Alternatively, write a small java Application which opens a URLConnection
to your JSP page URI and run the Application from a Cron (or MS-Scheduler)
The App can be on local or remote computer.

Al

----- Original Message -----
From: "Denis Balazuc" <denis.balazuc@trader.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Wednesday, November 07, 2001 4:00 PM
Subject: Re: Running Scheduled Task in Tomcat


> I have exactly the same kind of process in place within Tomcat.
> I don't think Tomcat has any module to ease this so here's what I've done
:
>
> I have created a webapp (without any page) capable of running abstract
Task
> classes using a TaskRunner servlet
> The TaskRunner servlet knows from its configuration (in web.xml) what task
> class to load/run as well as how to connect to mail servers and databases.
> When a task is created, the TaskRunner servlet configuration is forwarded
to
> each created task before the task is started so that each task can have
its
> configuration stored within web.xml.
> Tasks can be started/stopped and logs viewed using the servlet (by
> requesting some URL with some parameters)
>
> This way, you have running process within Tomcat that can do whatever you
> want (including requesting a JSP page).
> Please send me an e-mail if you're interested in the tasks/servlet code
that
> I use.
>
> Hope this helps
> Denis
>
>
> ----- Original Message -----
> From: "Chintan Shah" <cvshah@lucent.com>
> To: <tomcat-user@jakarta.apache.org>
> Sent: Wednesday, November 07, 2001 04:03 AM
> Subject: Running Scheduled Task in Tomcat
>
>
> > Hi All,
> >
> > I am using Win NT 4.0, Tomcat 3.2.1, Java 1.3 for my intranet based
> application (using jsp-javabeans-jdbc-db architecture). I want to set an
> automatic task (execution of a jsp page) in tomcat, which will be executed
> on scheduled time.
> >
> > For example, everyday at 1:00 a.m. the jsp (java) code should be
executed
> automatically, which (for example) may be firing a query onto database and
> getting a list of records, and sending some mails on particular criteria.
> >
> > How can I do this ? (I don't want to set Windows Scheduler Tasks, which
> can execute a jsp page by opening a new browser window (at scheduled time)
> with that page and after some seconds, it will automatically close the
> browser window.)
> >
> > any help is highly appreciated,
> >
> > thanks in advance,
> > Chintan
>
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message