Create a "ScheduledThread" that periodically checks the current time, and
doesn't execute the Runnable's run() method until it's past the given
criteria. Then fire the ScheduledThread off like so:
java.util.Date = get_date_for_later(); // whenever that's supposed to be
new ScheduledThread(new Runnable() {
public void run()
{
}
}).start();
and forget about it until it's completed.
<SHAMELESS PLUG>
I describe how to do precisely this in my forthcoming book, "Server-Side
Java" ( http://www.manning.com/Neward3 ).
</SHAMELESS PLUG>
If you can't get it to work, I'll fire the code I came up with to you.
Ted Neward
http://www.javageeks.com/~tneward
On Tue, 14 Dec 1999, Tom John wrote:
> Hi,
>
> I wan't to write a THREAD in my project(client/server web based project)
> What I need is, to execute a servlet on a particular day which has been
> given earlier(the day).
> Early response highly appreciated
>
> TOM
>
> ___________________________________________________________________________
> 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
>
___________________________________________________________________________
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