Mark Woollard wrote:
What's the recommended way to run a periodic task from within a WO application? In this case its infrequently (hourly) and independent of any web requests.
For me...
public class SomeTask extends ERXTimerTask {
public void _run() {
// do something
}
}
....
long delay = 20;
long period = 86400 * 1000;
SomeTask task = new SomeTask();
Timer timer = new Timer(true);
timer.schedule(task, delay, period);
....
See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Timer.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]