Link to home
Start Free TrialLog in
Avatar of mrcoulson
mrcoulsonFlag for United States of America

asked on

How can I run a piece of code every five minutes?

I've been reading up on System.Timers.Timer and System.Threading.Timer, but I can't seem to make the synaptic leap between my n00bness and the answer.  Basically, I just want to run a piece of code every five minutes.  Right now it's running on a button click.  I'd rather have it just run every five minutes on its own so the user can minimize the application and only worry about it when something happens.  So, how do I make a line of code run at a timed interval?
ASKER CERTIFIED SOLUTION
Avatar of joesthebighmoe
joesthebighmoe
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I meant "Call the code you want to run."
Avatar of mrcoulson

ASKER

Easiest 500 points you'll earn all day?  Maybe!  Thanks a ton!  Now my app is complete.

My next version will run as a service.  I'm a new developer, so I'm taking baby steps.  Nonetheless, this thing would be better for the user if it were a service.

Jeremy