How would one program Exponential Backoff into this script so that when I run into an error it will attempt to run again?
Errors being encountered:
- There are too many scripts running simultaneously for this Google user account.
- Too many simultaneous invocations: Spreadsheets
- Exceeded maximum execution time
- Exception: Too many simultaneous invocations: Spreadsheets at onEdit(Code:3:9)
- Service Spreadsheets failed while accessing document with id __________.
Script:
function onEdit() {
var s = SpreadsheetApp.getActiveSheet();
if( s.getName() == "FORD" ) {
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');
}
}
}
Any other advice to improve my script is always appreciated! =)