Question: I want to rerun a function if it returns true and rerun it after a second if it returns false.

```
function longSynchronous() {
  return condition ? true : false // "condition" is a longlasting synchronous request which either returns true or false
}
function schedule() {
  if (longSynchronous()) {
     schedule()
  } else {
    setTimeout(function() {
       schedule()
    }, 1000);
  }
}
schedule()

```

However, after one round, `longSynchronous()` already equals true or false without having to run and complete again. So I end up having infinitely running function `schedule()` without ever stopping for timeout.
Is there a way to make `schedule()` run each time without being `true` or `false`

Answer: 
It sounds like you're wanting to poll for something but your program isn't waiting for the poll result each time. If that's the case, then callbacks will help you here.

```
function longSynchronous(callback) {
  setTimeout(function() {
    callback(condition);
  });
}
function schedule() {
  longSynchronous(function(result) {
    if(result) {
      schedule()
    } else {
      setTimeout(function() {
        schedule()
      }, 1000);
    }
  });
}
schedule()

```

[Here's a Fiddle](https://jsfiddle.net/) demonstrating that functionality, but I'm a bit confused by the last part of your question so I could be off the mark here.
Buddy there is some problem in your condition, because in your if condition you are calling longSynchronous() which is a function and on every call it will return a value according to your condition and not a variable which is meant to be set.