How can we store tables externally to be able to run again the code after a 30 min execution?

Viewed 31

My issue is the app scripts time limit of 30 minutes. My script is longer that 30 min to be completed so I must process it by batches.

I have to store 2D arrays and the iterator to be able to continue during the next running with my previous values stored. What method could I use to store externally 2D arrays in order to be able to get access to it as easily as possible ?

My table contains about 29 2D arrays of 720k values

1 Answers

You could append the processed arrays into a Google Sheet, and save the iterator in a script property. When the script runs it looks for the prop. If it finds it then it uses it, if not, then it starts at the first array. When the script is done it updates the prop.

Related