title: Updating/refreshing google sheets cells every minute automatically
body: <p>I'm  trying to write a test script to make Google sheets update its cells automatically every minute. It's important I get this test script to work, so I can use it to do other things.</p>
  
  <p>I have a google apps script function as follows:</p>
  
  <pre><code> function custom_function(id){
    return new Date().toLocaleTimeString();;
  }
  </code></pre>
  
  <p>Basically this correctly returns the current time, and the id parameter isn't used. If I use this function in a cell, i.e. <code>=custom_function(B4)</code> then it correctly computes the current time and displays it in the cell. So far so good. </p>
  
  <p>But the cell doesn't update by itself. I'm trying to make it so this cell's value, i.e. the current time, is automatically updated every minute without any interaction by the person viewing the spreadsheet.</p>
  
  <p>I've tried installing a trigger that calls the following function every  minute:</p>
  
  <pre><code>function private_function(){
          SpreadsheetApp.flush();
  }
  </code></pre>
  
  <p>My trigger does call this function every minute, but the flush does not seem to do anything. I was under the impression that flush would cause all the cell entries to be recomputed, thereby updating the values of every cell by calling the <code>custom function</code> again in every cell. It doesn't do what I want. Is there a simple way to do what I'm trying to do without bringing in dummy time-based parameters into all my functions?</p>