title: Execute jQuery code when page loads for first time and then after time period
body: <p>I have a piece of jQuery code and I need to execute when page load for first time, then I need to execute the same code after 30 minutes (less take this value as example) of course if page is open. I know how to execute code every 30 minutes by using this:</p>
  
  <pre><code>window.setInterval(function() {
      ...
      });
  }, 1800000); // Updates each 30 minutes
  </code></pre>
  
  <p>But which is the best approach to do this, I mean execute code first time page loads and then every 30 minutes, do I explain myself?</p>