[英]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.