An example on how to repeatedly check a server