title: c# - How would i run a script EVERY 30 seconds?
body: <p>How would I have my ftp script run every 10 or 30 seconds?</p>
  
  <p>ftp script:</p>
  
  <pre><code>FtpWebRequest makedir = (FtpWebRequest)WebRequest.Create("ftp://xxx.xxx.xxx.xxx/" + System.Environment.MachineName + "___" + System.Environment.UserName + @"/");
  makedir.Method = WebRequestMethods.Ftp.MakeDirectory;
  makedir.Credentials = new NetworkCredential("usr", @"passwd");
  FtpWebResponse makedirStream = (FtpWebResponse)makedir.GetResponse();
  makedirStream.Close();
  </code></pre>
  
  <p>I was reading about using sleep on a thread and also about using a timer.. but I cant figure out how to use either.. The thing is that it also needs to rerun every 30 seconds not just once.</p>