简体   繁体   English

如何添加在第15分钟附近每小时运行一次的Google脚本触发器?

[英]How to add a google script trigger that runs every hour near minute 15?

This is what I've tried 这就是我尝试过的

ScriptApp.newTrigger("myFunction")
.timeBased()
.everyHours(1).nearMinute(15)
.create();

But it doesn't run near minute 15. 但是它并没有在15分钟左右运行。

Later Edit: It seems to be working as expected. 以后编辑:似乎按预期工作。 I'm leaving this open just in case someone else needs it. 我将其保留为开放状态,以防其他人需要它。

Per the comments, it appears the reported time of execution is listing the time the script completes. 根据注释,似乎报告的执行时间正在列出脚本完成的时间。 So beginning near the 15 minute mark, yet completing at the 17 minute mark. 因此,从15分钟标记开始,直到17分钟标记结束。

try everyHours() 尝试everyHours()

ie

ScriptApp.newTrigger("myFunction")
.timeBased()
.everyHours().nearMinute(15)
.create();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何安排每小时在perl中执行一部分脚本,而其余部分每分钟刷新一次 - How to schedule execute a part of script in perl once every hour while the rest is refreshing every minute 谷歌脚本每分钟触发不起作用 - Google scripts every minute trigger not working Google Apps 脚本应仅在工作日上午 10 点至下午 5 点每小时触发 - Google Apps Script should only trigger during week days during hours 10 AM - 5 PM every hour 如何每隔15分钟从表中的数据库中获取数据? - How to fetch data from database in table at every 15 minute? Google脚本 - 创建一个每秒运行一次的脚本 - Google Scripts - Creating a script that runs every seconds 如何在整点设置应用程序脚本时间触发器? - How to set app script time trigger on the hour? 有没有办法在 Google Apps 脚本中创建一个每秒增加一分钟的 for 循环? - Is there a way to create a for loop in Google Apps Script that increases every second for a minute? 如何自动每小时运行一次CasperJS脚本? - How to run a CasperJS script every hour automatically? 每小时倒数计时器,但在 30 分钟标记 - Countdown timer every hour but on 30 minute marks 如何每分钟触发一次 React js 组件的重新渲染? - How can you trigger a rerender of a React js component every minute?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM