Maximum run time of Google script per user or per

2019-08-30 09:08发布

问题:

I'm sure it will be per user - but - is the maximum script runtime in a 24 hour period, for 'Google Apps For Business' 6 hours per user or 6 hours for all users on the account.

Thanks

EDIT: more detail of my particular situation

OK. Still unclear. The web link to Google of quotas doesn't make it clear - it just says 6 hours. So 6 hours each with 8000 users is a massive amount but conversely 6 hours between 8000 users is tiny. My particular situation is a script runs via an installable time driven trigger that converts excel attachments (size 3mb each) from Gmail to Google sheets, searches the file for specific content, if found it copies further content to another Google sheet, if no content then sends a response to sender telling them to fill in the correct form and attaches it. It takes circa 5 minutes to process 3 messages (9 attachments) we currently receive 25 submissions weekly but this is going to increase to 300 submissions weekly. The script runs every 10 minutes. When we reach 300 submissions then after 500 minutes of runtime the process will complete. Generally they all arrive on the same day so i will reach the 6 hours on day 1 and it will start again on day 2 to complete.

So the question is will everyone else in the organisation not be able to run triggered scripts upon breaching the 6 hours on day 1?

回答1:

There is a maximum Trigger run time based on the total script execution time for your Google Apps account, this is an account aggregate and is not per user.

If you had 8000 users directly utilizing Apps Script via triggers (Like a Web App via the simple doGet trigger) they would get 2.7 seconds of execution time each before reaching your accounts daily quota.

If you are reaching or exceeding this limit, I would recommend looking into your biggest execution time sinks. Don't obtain a sheet reference on each iteration of a loop, make large aggregate inserts or imports instead of one row at a time, don't deploy a web app through Apps Script that will have thousands of users.

It's good to note that manually ran scripts do not contribute towards this limit, I am not sure what that limit is.

Why the downvotes? Is this not correct?

Edit:

  • Quotas Documentation
  • Apps Script Dashboard
  • Blog Post on Dashboard, mentioning account quotas