无法删除触发器(google-apps-script) [英] Unable to delete triggers (google-apps-script)

查看:135
本文介绍了无法删除触发器(google-apps-script)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎触发了我无法在Google Apps脚本中删除的触发器。我有一个理论,为什么我不能删除它们,但没有线索如何解决这个问题。这些触发器被附加到绑定到与我共享的单独Google帐户上的文件的脚本中。我当然能够编辑和修改脚本,并且在共享文件时我想要的。从那时起,尽管与我共享文件的Google帐户被删除,我认为冻结的触发器是来自该帐户的那些文件的残留。有关如何解决此问题的任何建议?

I appear to have triggers that I cannot delete in my Google Apps Script. I have a theory as to WHY I cannot delete them, but no clue how to fix the problem. These triggers were attached to a script bound to files on a separate Google account that were shared with me. I of course was able to edit and modify the script and such as I wanted while the files were shared. Since then though the Google account that was sharing the files with me was deleted and I think the triggers that are "frozen" are residues from those files from that account. Any suggestions on how to fix this issue?

推荐答案

简单触发器不能从该窗口中删除:
请看这里

Simple triggers can not be deleted from that window: See Here

请将此函数添加到脚本并运行它:

Instead add this function to your script and run it:

function deleteTriggers() {
  var allTriggers = ScriptApp.getProjectTriggers();
  for (var i = 0; i < allTriggers.length; i++) {
    ScriptApp.deleteTrigger(allTriggers[i]);
  }
}

这篇关于无法删除触发器(google-apps-script)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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