![](/img/trans.png)
[英]Run google apps script only once after "IF" criteria met, once per month
[英]Run apps script (google sheets) again after 30 minutes if condition not met but maximum once per day
我想在谷歌表格中的每日触发器上运行一个脚本。 该脚本应首先检查 Sheet1 的单元格“A1”是否具有值“DO NOT RUN” - 然后它应等待 30 分钟再运行(此时 A1 中的值应因另一个脚本而改变)。
该脚本每天不应运行超过一次。
如果 A1 的值将被另一个脚本更改,最好让另一个脚本创建一个时间驱动的触发器集,以便在所需时间之后运行。
const action = 'put here the name of the function';
const minutes = 30;
const trigger = ScriptApp.newTrigger(action)
.timeBased()
.after(minutes * 60 * 1000)
.create();
笔记:
有关的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.