• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best way to run period task?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to run period task?


  • Subject: Re: Best way to run period task?
  • From: Jon Nolan <email@hidden>
  • Date: Wed, 06 Jan 2010 18:25:08 -0700
  • Organization: Loch Garman

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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Best way to run period task? (From: Mark Woollard <email@hidden>)

  • Prev by Date: Re: Best way to run period task?
  • Next by Date: Re: Best way to run period task?
  • Previous by thread: Re: Best way to run period task?
  • Next by thread: Re: Best way to run period task?
  • Index(es):
    • Date
    • Thread