How can I use executeInParallel?

765 views
Skip to first unread message

Iulia Mareș

unread,
Jan 8, 2018, 3:41:19 PM1/8/18
to AdWords Scripts Forum
Hello!

I'm new in AdWords Scripts and I need help :) 

I have a nig MCC and I have to go through it to get some reports. I have to executeInParallel because in 30 minutes he processes only half of my MCC. I have seen in the documentation that I can select a limit of 50 accounts, but how can I then take them on the following? You can give me an example of a MCC scroll through with executeInParallel, please?

Thanks!

Thea Vega (AdWords Scripts Team)

unread,
Jan 9, 2018, 12:25:27 AM1/9/18
to AdWords Scripts Forum
Hello Iulia,

Based on my understanding, you were working on multiple accounts in series but it only executes for 30 minutes so you decided to use the executeInParallel() function. However, executeInParallel() function can only process a maximum of 50 accounts

With this, I suggest that you do any of the following:
  • You can use the executeInParallel() function using the withIds() function in the selector, and specify an array with a minimum of 50 CIDs you wish to process. You can manually change the array after the script runs with another set of 50 CIDs.
  • You can write multiple scripts of the same code doing the first suggestion mentioned above, but with different sets of CIDs, and run them at the same time.
You may see this example on how to use executeInParallel() on an MCC script. 

Hope this helps.

Thanks,
Thea
AdWords Scripts Team

Sigurd

unread,
Jan 11, 2018, 5:00:52 AM1/11/18
to AdWords Scripts Forum
Hi Lulia,

Try wrapping your single account script in this code to make it execute in parallel across up to 50 accounts or sequentially if you have more. It works beautifully.
Reply all
Reply to author
Forward
0 new messages