Hi, its much clearer now.
Here is globaly how you can achive your goal :
I) Running an app at a specific time.
-the best solution : use windows tasks. windows allow you to run a specific software at a specific time (daily weekly or monthly).
=> So you will no longer have to worry about your app running at a specifc time each day.
-For the file location, you will probably specife your location in the code.
specifiying the location in the app.config is possible (i guess), but i don't now how to do it.
II) General Idea to capture webPages html code.
I am working a lot with this kind of apps. you have 2 solutions. either use WebBrowser or httpwebRequets.
the easiest is the later. httpwebRequest allow you te get the html code of a page synchronously. its perfect to start with this technique.
Here is a sample to get an url html code:
public string CapturePage(string url)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Accept = "*/*";
request.AllowAutoRedirect = true;
request.Timeout = 60000;
request.UserAgent = "http_requester/0.1";
request.Method = "GET";
request.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader sr = new StreamReader(response.GetResponseStream());
string sourceCode = sr.ReadToEnd();
sr.Close();
response.Close();
return sourceCode;
}
I don't think you will have to use threads for now. In the other hand, its much better to develop the app as console application, so it automatically close when the task is finished.
III) timers:
Timers don't have anything to do with threads. the idea is to instanciate one or many timers.
once the timer reach its cooldown time, an event is raised.
here is a link to understand the logic: (MSDN)
http://msdn.microsoft.com/fr-fr/library/system.timers.timer(v=vs.110).aspx[
^]
Pretty Easy :) no thread needed
Don't hesitate to ask more questions.
Hope it helps.