3 ms·
I'm not sure what operations you're doing that you're CPU bound. When exporting Gmail and hitting an execution timeout, I would implement partitioning by date.
by adobrawy 2y ago
I'm not sure what operations you're doing that you're CPU bound.
When exporting Gmail and hitting an execution timeout, I would implement partitioning by date. Google Apps Script has a lock mechanism ( https://developers.google.com/apps-script/reference/lock https://developers.google.com/apps-script/reference/lock ), and you can use user properties for progress tracking ( https://developers.google.com/apps-script/reference/properties/properties-service#getUserProperties https://developers.google.com/apps-script/reference/properti...() ). Therefore, you can schedule a task every x minutes to pull x days of data and keep the cursor in user properties.
- tonymet 2y agoYeah that’s what I mean. Another trick I’ve used is building a web page that reloads itself because interactive calls have more generous quotas