Google应用程序脚本 - 在onOpen触发器中使用setInterval - 错误“未定义” [英] Google application script - using setInterval in in onOpen trigger - error "undefined"

查看:123
本文介绍了Google应用程序脚本 - 在onOpen触发器中使用setInterval - 错误“未定义”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试在onOpen触发器中使用setInterval函数。当我运行它时,我得到setInterval未定义。错误。在Google应用程序脚本中使用setInterval是否有任何限制?

I am trying to use setInterval function in onOpen trigger. When I run it I am getting " "setInterval" is not defined." error. Are there any restrictions to using setInterval in Google Application Script?

这是代码:
setInterval(function(){Logger.log(test)) ;},100);

This is the code: setInterval(function(){ Logger.log("test");},100);

推荐答案

您可以尝试使用Time触发器
https://developers.google.com/apps-script/execution_time_triggers

You can try to use Time triggers https://developers.google.com/apps-script/execution_time_triggers

这篇关于Google应用程序脚本 - 在onOpen触发器中使用setInterval - 错误“未定义”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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