Results 1 to 2 of 2

Thread: scheduling actions from within an app

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    Rochester NY, USA
    Posts
    93
    Hi..

    I'm trying to write an application that perform certian tasks at certian times. Basically, the user enters the frequency (5 minutes, 10 minutes, etc.. ) and the app will perform what it's written to do at those times. My only preliminary thought was just looping until the time is met but that would be tremendously CPU intensive. Are there any other controls or methods that would handle this better?

    Thanks,
    Rich

  2. #2
    Addicted Member jcouture100's Avatar
    Join Date
    Aug 1999
    Posts
    141
    I would suggest using the Timer Control. Use the Timer Interval property to set the amount of time you want to pass before running your specified task. If the timer control won't handle the large time interval, then just check the system time at each timer interval and compare it to the start time to see if your specified amount of time has passed. If the appropriate amount of time has passed, then you can fire off your specified task.

    I know that this is a pretty general answer. If you need more specifics, feel free to drop me a line and I'd be happy to give you more details.

    Hope this helps.
    JC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width