title: How do I program Exponential Backoff into a Google Sheets Script?
body: <p>How would one program Exponential Backoff into this script so that when I run into an error it will attempt to run again?</p>
  <p><strong>Errors being encountered:</strong></p>
  <ul>
  <li>There are too many scripts running simultaneously for this Google user account.</li>
  <li>Too many simultaneous invocations: Spreadsheets</li>
  <li>Exceeded maximum execution time</li>
  <li>Exception: Too many simultaneous invocations: Spreadsheets at onEdit(Code:3:9)</li>
  <li>Service Spreadsheets failed while accessing document with id __________.</li>
  </ul>
  <p><strong>Script:</strong></p>
  <pre><code>function onEdit() {
    var s = SpreadsheetApp.getActiveSheet();
    if( s.getName() == &quot;FORD&quot; ) {
      var r = s.getActiveCell();
      if( r.getColumn() == 3) {
       
        var nextCell = r.offset(0,19);
        if( nextCell.getValue() === '' )
          nextCell.setValue(new Date()).setNumberFormat('MM/dd/yyyy HH:mm:ss');
      }
      
      if( r.getColumn() == 7) {
        var nextCell = r.offset(0,16);
        if( nextCell.getValue() === '' )
          nextCell.setValue(new Date()).setNumberFormat('MM/dd/yyyy HH:mm:ss');
      }
    }
  }
  </code></pre>
  <p>Any other advice to improve my script is always appreciated!  =)</p>