Reputation: 127
I am developing a desktop window application. After form load, get some data from running machine and saved it to the ftp server in csv file and it shows that test completed. I want to run the same code which takes values and store on the sever after every one hour. How can i do it?
Console application and window service is not feasible solution because I have to show the form to the user etc.
Upvotes: 0
Views: 503
Reputation: 498982
Use one of the timer classes that come with the BCL.
See Comparing the Timer Classes in the .NET Framework Class Library on MSDN.
Essentially you setup a timer with an interval (how often to fire, in your case every hour) and with a method to execute when it fires.
Upvotes: 2