Google application script - using setInterval in i

2019-07-03 16:58发布

问题:

I am trying to use setInterval function in onOpen trigger. When I run it I am getting " "setInterval" is not defined." error. Are there any restrictions to using setInterval in Google Application Script?

This is the code:

setInterval(function(){
  Logger.log("test");
}, 100);

回答1:

You can try to use Time triggers https://developers.google.com/apps-script/execution_time_triggers