如何在打开Goog​​le Spreadsheet文档时始终执行的无限循环中停止Google应用程序脚本? [英] How to stop a google app script from an infinite loop always executed when opening the Google Spreadsheet document?

查看:97
本文介绍了如何在打开Goog​​le Spreadsheet文档时始终执行的无限循环中停止Google应用程序脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图实施一个改进的谷歌脚本解决方案,建议在这里: Google电子表格:脚本在单元格更改文本时更改行颜色; 然而,在调试脚本后,它发生了我的文档无法访问。似乎我的脚本是错误的,并阻止我的文档打开...结果是,我不能禁用/编辑/删除相关的谷歌脚本和我被卡住了!



您是否有办法解决这个阻塞问题?

谢谢,

>

法比恩

更新:经过进一步调查,似乎问题的原因是由于事件触发器onOpen()调用了无限循环脚本。因此,我的问题可以重新制定为:

如何阻止进入无限循环的Google应用程序脚本?



我可以使用另一个脚本来终止执行这个错误的脚本吗?

解决方案

是一个约6分钟的限制,超出该限制脚本将停止执行。这适用于在触发器上运行的函数。但绝对值得等待6分钟,您的电子表格打开。

I was trying to implement an improved solution of the google script suggested here: Google Spreadsheet: Script to Change Row Color when a cell changes text;.

However, after debugging my script, it occurred that my document is not accessible anymore. It seems that my script is erroneous and prevents my document from opening... The consequence is that I cannot disable/edit/remove the associated google script and I am stuck!

Do you have a way to solve this blocking issue?

Thanks,

Fabien

UPDATE: After further investigations, it seems that the reason of the problem is due to an infinite loop script called from the event trigger onOpen(). So my question can be reformulated to:

How do you stop a Google App script that gets into an infinite loop?

Can I use another script to kill the execution of this erroneous script ?

解决方案

There is a limit of about 6 minutes beyond which a script will stop executing. This is applicable to functions run on a trigger. But it is definitely worth waiting 6 minutes with your spreadsheet open.

这篇关于如何在打开Goog​​le Spreadsheet文档时始终执行的无限循环中停止Google应用程序脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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