首页 > 解决方案 > Google 脚本:我的基于时间的触发器不起作用

问题描述

我做了这个触发器,让它运行了几天,但它还没有工作。我的功能相当简单:有一个可以随时按下的按钮,但我也希望它在每晚 11:59 PM 运行/按下。这是功能:

// Triggers 'Move to Custom Report' button every 24 hours
// Runs at approximately 23:59 am in the timezone of the script
function triggerCustomReportButton(){
  ScriptApp.newTrigger("sendToCustomReportSheet")
  .timeBased()
  .atHour(23)
  .nearMinute(59)
  .everyDays(1)
  .create();
}

“sendToCustomReportSheet”是按下按钮后运行的函数。谢谢

标签: google-apps-scriptgoogle-sheetsspreadsheet

解决方案


推荐阅读