Google Ads Script time limit

682 views
Skip to first unread message

Antoine P

unread,
Nov 11, 2020, 1:57:57 PM11/11/20
to Google Ads Scripts Forum
Hi there,

We made a script and applied it at the mcc level.
However the script couldn't run completely as it stops after 30 minutes.

We checked online resources and it looks like 30 minutes is the limit. 
We tried to use the executeinparallel feature that allows to go up to 60 minutes but it is still the same issue.

Does anyone know f we can bypass this 30 minute limit (which is so annoying by the way)?
If yes how?

Thanks for you help,
Have a good day,

Google Ads Scripts Forum Advisor

unread,
Nov 12, 2020, 3:38:41 AM11/12/20
to adwords...@googlegroups.com

Hi Antoine,

 

Thanks for reaching out and allow me to assist you in this. Unfortunately, the 30 minute execution time is the standard limit in the Google Ads Scripts and when the executeInParallel is used, scripts can execute up to a maximum of 60 minutes before being cancelled at the MCC level. See Limits for your reference.

 

If you would like, I can take a look at your script to identify why it would exceed the execution limit. Kindly share with us your CID and the script ID via Reply privately to author or Reply to author option instead. If those options aren't working on your end, you can send those requested details on this email (googleadsscr...@google.com) and include the link of this thread so we could keep track of this existing conversation.

 

Thanks,

Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q27t80K:ref

Michael Ramsey

unread,
Nov 12, 2020, 8:00:12 AM11/12/20
to Google Ads Scripts Forum
I've bypassed this issue by restructuring the script to run in stages. I set a list of accounts/campaigns/steps in a spreadsheet and gauged how many I could safely run within the 30 or 60 minute window. The script tracks which are completed in a column on each run. I then schedule it to run each hour for 3 hours for example. If you need to run them all in a shorter period you could likely do the same thing but have multiple instances run on different sets concurrently. 

You should be aware that script execution speed is absolutely NOT consistent. Sometimes they will execute faster and sometimes slower, so you need to account for it taking longer than expected. It's usually +/- 15% around the average execution time but in rare instances it can take much longer.

Google Ads Scripts Forum Advisor

unread,
Nov 12, 2020, 10:37:12 PM11/12/20
to adwords...@googlegroups.com

Hi Michael,

 

Thanks for sharing. This is indeed a very interesting workaround to the Google Ads Scripts Limits. Another workaround I could recommend is to apply labels to entities that have been successfully updated/processed to minimize execution time in which has the concept with how the Link Checker solution script works.

 

@Antione: If you'll need further assistance, kindly provide the requested details privately or let me know if you have other questions.

Antoine P

unread,
Nov 16, 2020, 2:33:59 PM11/16/20
to Google Ads Scripts Forum
Hi Michael and Harry,

Thanks for your replies.
We splitted the script into several and they are now working.
It is just a shame we can increase that 30 minutes limit.

Thanks again for your help,

Petra Manos

unread,
Nov 19, 2020, 10:33:38 PM11/19/20
to Google Ads Scripts Forum
I'm running into this with many of my scripts, especially since some of the more efficient javascript functions are not available in Google Ads scripts and so sometimes we have to construct multi-tiered loops to do comparisons which are extremely inefficient due to requiring too many cycles.

Personally I'm going to look into whether I can move some of my Google Ads scripts into a python script and call the API instead, but I haven't gone down that route yet.

What I do for the time being is I have a spreadsheet for all my clients and I have variables that cause a timeout on the spreadsheet and they can be adjusted there rather than in the script. So for example if testing something that normally checks data over 365 days but it times out, I can change it to 90 days in the spreadsheet and I don't need to replace the script.

Google Ads Scripts Forum Advisor

unread,
Nov 20, 2020, 2:02:38 AM11/20/20
to adwords...@googlegroups.com

Hi Petra,

Thanks for sharing your thoughts.

I do agree that changing the date range would make sense as it limits the result iterations which would greatly affect the script runtime.

Regards,

Google Logo
Mark Kevin Albios
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q27t80K:ref
Reply all
Reply to author
Forward
0 new messages