Google脚本每个用户或每个帐户的最长运行时间 [英] Maximum run time of Google script per user or per account

查看:144
本文介绍了Google脚本每个用户或每个帐户的最长运行时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确定它是按用户使用的 - 但是 - 它是24小时内最大的脚本运行时间,对于Google Apps for Business,每个用户6小时或帐户中所有用户6小时。



谢谢

编辑:我特殊情况的更多细节

确定。仍不清楚。谷歌配额的网页链接并没有说清楚 - 它只是说了6个小时。因此,每8000个用户6个小时是一个巨大的数量,但相反,8000个用户之间的6个小时是微不足道的。我的特殊情况是脚本通过可安装的时间驱动触发器运行,该触发器将Excel附件(每个大小为3mb)从Gmail转换为Google表格,在文件中搜索特定内容,如果发现它将进一步的内容复制到另一个Google表格(如果没有内容)向发件人发送回复,告诉他们填写正确的表格并附加。处理3条消息(9条附件)需要大约5分钟的时间,我们目前每周收到25份提交文件,但每周将增加到300份提交文件。该脚本每10分钟运行一次。当我们达到300份提交,然后运行500分钟后,过程将完成。一般他们都在同一天到达,所以我会在第一天达到6小时,并且会在第二天再次开始完成。所以问题是每个人都会否则在组织中无法在第1天的6小时内运行触发的脚本?解析方案

有一个最大触发器运行时间基于您的Google Apps帐户的总脚本执行时间,这是一个帐户聚合,并非每个用户。



如果您有8000个用户直接使用Apps Script通过触发器(就像通过简单的doGet触发器的Web应用程序),他们每天在达到帐户每日配额之前将获得2.7秒的执行时间。



如果您达到或超过这个限制,我会建议看看你最大的执行时间汇。不要在循环的每次迭代中获取工作表参考,请一次进行大量聚合插入或导入而不是一行,而不要通过将有数千用户的Apps脚本部署Web应用程序。



值得注意的是,手动运行脚本不会影响这个限制,我不确定这个限制是什么。



为什么降价?这是不正确的吗?

编辑:
$ b $ ul

  • 配额文档

  • Apps脚本信息中心

  • 仪表板上的博客文章,提及帐户配额

    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?

    解决方案

    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:

    这篇关于Google脚本每个用户或每个帐户的最长运行时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆