Question: UPDATE 2:

OK, looks like it runs the first time after a minute. How do I get it to run onload, then every minute after that?

**UPDATE 1:**

I've tried: `var interval = setInterval(get_reported_incidents, 60000);` but nothing happens. in `get_reported_incidents();` I just have an `alert("hello");`.

**ORIGINAL QUESTION:**

I want to run a function every minute:

```
get_reported_incidents();

```

But I am not sure which method is best for this task;

`settimeout` or `setinterval`

Answer: 
Using `setinterval` would be the more natural choise. If you use `setTimeout`, you have to start a new timeout from the event handler.

```
window.setInterval(get_reported_incidents, 60*1000);

```
obviously `setinterval` might be easier to maintain in your case

```
get_reported_incidents(); //first call
var interval = setInterval(get_reported_incidents, 60000);

```

vs

```
var interval;
function timeout (){
    get_reported_incidents();
    interval=setTimeout(timeout, 60000);
}
timeout();

```