Home > Enterprise >  Google Apps Script: does the 30 simultaneous executions limitation apply to the owner of the script
Google Apps Script: does the 30 simultaneous executions limitation apply to the owner of the script

Time:08-14

I manage a large Google spreadsheet where I use apps script to automatically sort and format form responses by using time-based triggers. This sheet and many more like it are owned by one google account, not the ones who manage the individual sheets.

I have noticed that the performance of my scripts is very inconsistent over time. One minute they execute in 10-30 seconds, then they keep timing out for 2 hours, just to then suddenly work again. This happens regardless of what the actual script is and whether it is run by a trigger or manually.

I know that one of the limitations of Apps Script is 30 simultaneous executions per user.

So my question is: Does that limitation apply to the owner of the apps script project or the one who set up the triggers and runs the scripts?

Because if it's the former, then maybe the reason for the performance issues is that there are dozens of sheets fighting over those 30 execution slots?

CodePudding user response:

Quota call is attributed to the user running the script. The "user running the script"/the effective user is different in different circumstances. In case of

Instance Whose quota?
Script editor "Run" User at the keyboard
Menu "Run"/Button click User at the keyboard
Simple triggers User at the keyboard
Installable triggers User who installed the trigger(regardless of who is at the keyboard)ref
Custom function User at the keyboard
Webapp(execute as me) User who installed the trigger(regardless of who is at the keyboard)
Webapp(execute as user accessing) User at the keyboardref

Quota calls are not attributed to the owner unless the owner satisfies any of the above criteria.

Reference:

User identity/permissions

  • Related