Have been searching for a clear explanation of the quota rule for triggers, but in vain. Can anyone explain if this below will work?
I am creating 50 scripts for 50 files (the code inside each script only differs by each of 50 files id). Each script will have an installable trigger onOpen, where a function referring to one single master file, will be executed. I read the quota 20 triggers / per user per script and cannot make a conclusion regarding my situation based on this rule...( Thanks, all in any case!
CodePudding user response:
For context for other community members in this page: https://developers.google.com/apps-script/guides/services/quotas you will find this and other limits that apply to Apps Script projects, triggers and function executions.
In your use case this won't be a problem. You will be creating projects and triggers in a 1 : 1 ratio. Apps Script allows up to 20 triggers per project.
You can share that project with someone and this person will be allowed to create 20 more triggers. If you create a new Apps Script project you will be able to create more triggers in the new project.
Trying to create additional triggers will result in this error message:
Exception: This script has too many triggers. Triggers must be deleted from the script before more can be added.
CodePudding user response:
I do believe here in this article where you have read these quota limits presented.
Triggers 20 / user / script 20 / user / script
20 triggers can be added by a single user on an App Script file, and App Script is a collaborative development tool, multiple users can contribute/collaborate on an App Script project, which means a single App Script project can contain 20> triggers if multiple users are working on the same project/file.
Relating to the setup you have explained, since you'll be only adding an onOpen()
trigger, technically this only states that you have added a single trigger which is consumed by your Google Account working on the said script file.
These limitations take effect on a per user basis, not on a per script count.