I have a spreadsheet that needs to 'setValue' to about 2000 rows. The problem is, after awhile, I get time-out.
So I'm looking for a solution to split up the job.
I'm thinking of creating a time-based trigger, possibly to start off where the last row or timeout ended. But I can't figure how to get trigger unique ID.
function triggerList() {
ScriptApp.newTrigger('populateList')
.timeBased()
.after(5 * 60 * 1000) // run every 5 mins. Script will time-out.
.create();
}
function deleteTrigger() {
// delete the above trigger
var triggers = ScriptApp.getProjectTriggers();
for (var i = 0; i < triggers.length; i++) {
Logger.log(triggers[i]);
}
}
There is a similar topic on this but i don't quite understand.
What happens when I "sleep" in GAS ? (execution time limit workaround)
Anyone has suggestions, workarounds?