title: How can I periodically ping a server to determine if it is available from a VB.NET app?
body: <p>I hope I am asking this correctly...</p>
  
  <p>What I am looking to do is ping a server every 30 minutes to an hour or so and to send an email if the server is not pingable. At the moment, all I have is the following code:</p>
  
  <pre><code>Private Sub Button1_Click(ByVal sender As System.Object,
                            ByVal e As System.EventArgs) Handles Button1.Click
      If My.Computer.Network.Ping("209.85.143.99") Then
          MsgBox("Server pinged successfully.")
      Else
          MsgBox("Ping request timed out.")
      End If
  End Sub
  </code></pre>
  
  <p>I am creating the project in Visual Studio 2010. All it does now is check if it can ping a server. I would like it to run this code every 30min. Can anyone tell me how I can do that?</p>