Is it possible to use setInterval / setTimeout

2,479 views
Skip to first unread message

David Bucher

unread,
Jul 15, 2014, 3:46:59 AM7/15/14
to adwords...@googlegroups.com
Is it possible ot make a timer that hits every 60 seconds. On a website i can pull that of using setInterval (javascript).

Is the same thing possible in AdWords Scripts?

PS: the window object (which is normaly the object of setInterval) is not defined.

David Bucher

unread,
Jul 15, 2014, 5:36:33 AM7/15/14
to adwords...@googlegroups.com
Didn't found a solution but i also can use the  AdWordsApp.getExecutionInfo().getRemainingTime() method.

Nothing against the Documentation, but if u need expirienced information, the documentation is not sufficent. 
Message has been deleted

Anash Oommen

unread,
Aug 6, 2014, 8:24:12 AM8/6/14
to adwords...@googlegroups.com
Hi David,

setInterval is not supported, mainly because Scripts runs on the server and hence window object wouldn't make sense. If you can explain your use case, then may be i could suggest an alternate approach?

Cheers,
Anash P. Oommen,
AdWords Scripts Team.

David Bucher

unread,
Aug 6, 2014, 10:18:47 AM8/6/14
to adwords...@googlegroups.com
My Script Changed/Created Labels and CPC of Keywords and AdGroups. I have several thousand Keywords and the Script was just could handle a few hundred. So i wanted to execute the script for 25 minutes and after that i wanted to send a mail with the changes.

You can use "AdWordsApp.getExecutionInfo().getRemainingTime()". It's not setInterval but u can catch the running time of the Script. So the problem is solved.
Reply all
Reply to author
Forward
0 new messages