Hi Gurpreet

I haven't tried this...but it came across my mind as I need something
similar very soon.

You could write a Struts plugin... init() method called on start of webapp
and destroy() method called on shutdown of webapp.

In the init() method you could start a thread that "wakes up" at specified
interval, say each minute, to check if there is some tasks that need to be
done, eg sending mails, cleaning up, make some coffee (;-))

In the destroy method you could stop the thread again

I don't know if this violates with the J2EE spec...I remember reading
something about threads...but that might be for EJBs only...Anyone can shed
some light on this issue?

Regards

Henrik

----- Original Message ----- 
From: "Gurpreet Dhanoa" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 02, 2003 12:47 PM
Subject: Scheduler


hi All


I want to implement a scheduler program something at the starting of the
application or at the starting of tomcat.

Basically i need one of my program to track all of the reminders i have set
in an web-application.

Say if i have set a reminder to send an email to client at 1400 hrs then it
should send that email at that time without the need of signing into the
account.



Any help will be of great use.


Thanks
Gary



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to