Call function every thirty seconds?

Call function every thirty seconds?

(ignore the 500 please, that's just for testing purposes)

  1. $(document).ready(function(){
  2.     setTimeout(function(){
  3.         alert('hey');
  4.     }, 30000);
  5. });
Any idea regarding this? I've looked up several questions on google, although I haven't found a specific answer sadly enough.