title: C# ASP.NET: Timer - How to execute a command every quarter hour?
body: <p>I want to execute a command every quarter hour, on the quarter hour. (24 hour format)</p>
  
  <p>so at 00:00:00, 00:15:00, 00:30:00 do something all the way up to 23:45:00</p>
  
  <p>Here is a piece of code that might help you under stand what I'm talking about.</p>
  
  <pre><code>  protected void UpdateTimer_Tick(object sender, EventArgs e)
    {
      DateStampLabel.Text = DateTime.Now.ToString("hh:mm:ss");
  
      //CREATE FOR LOOP TO REFRESH AT EVERY QUARTER HOUR
          if (DateStampLabel.Text == "00:00:00")
          {
              Response.Redirect(Request.RawUrl);
          }
          if (DateStampLabel.Text == "00:15:00")
          {
              Response.Redirect(Request.RawUrl);
          }
          if (DateStampLabel.Text == "00:30:00")
          {
              Response.Redirect(Request.RawUrl);
          }
          if (DateStampLabel.Text == "00:45:00")
          {
              Response.Redirect(Request.RawUrl);
          }
          ...
          ...
          ...
          if (DateStampLabel.Text == "23:45:00")
          {
              Response.Redirect(Request.RawUrl);
          }
      }
  </code></pre>
  
  <p>How can I achieve this same code with a for loop?</p>