• 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: Refresh
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refresh


  • Subject: Re: Refresh
  • From: Zak Burke <email@hidden>
  • Date: Fri, 23 Feb 2007 08:58:38 -0500

WIESEN Bruno wrote on 2/23/07 3:22 AM:
Hi all,

I have to refresh a file...so every 5 minutes an action has to be performed! But i don't know
which method use...do you have an idea?

See java.util.Timer and java.util.TimerTask. For example:

Put this in some method called by your Application's constructor:

    // 5 * 60 * 1000 == 5 minutes worth of milliseconds
    // but of course you'd read that value from a props file instead
    // of hard-coding a bunch of ints, right? right.
    Timer t = new java.util.Timer();
    t.scheduleAtFixedRate(new TimeableTask(), 0l, 5 * 60 * 1000);


public class TimeableTask extends java.util.TimerTask { public void run() { // your regularly schedule event here } }


zak. _______________________________________________ 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
  • Follow-Ups:
    • Re: Refresh
      • From: Robert Walker <email@hidden>
References: 
 >Refresh (From: WIESEN Bruno <email@hidden>)

  • Prev by Date: Re: Re(2): WebObjects 5.3.3 released
  • Next by Date: Re: Re(2): WebObjects 5.3.3 released
  • Previous by thread: Refresh
  • Next by thread: Re: Refresh
  • Index(es):
    • Date
    • Thread