ERROR: Another task is also trying to change this entity.

2,285 views
Skip to first unread message

Pooridon Rattnapairote

unread,
Mar 4, 2021, 8:08:34 AM3/4/21
to Google Ads Scripts Forum
My daily script is scheduled to enable/pause massive number of ads that contain specific label.

But just got a first error on Monday mentioning "Another task is also trying to change this entity."
messageImage_1614863181405.jpg
and it's happened only to campaigns in one of the for loop
(i'm using for loop to run email containing ....)

Note: I have no other script scheduled at the same time

I could pm a CID and script name if needed

Thanks in advance 

Google Ads Scripts Forum Advisor

unread,
Mar 4, 2021, 8:24:46 PM3/4/21
to adwords...@googlegroups.com

Hello there,

Thank you for raising this to us.

So our team could further check on this, could you share with us your Google Ads customer ID and the script name? You can also send those details directly to this email (googleadsscr...@google.com) and don't forget to include the link of this thread for reference.

Regards,

Google Logo
Mark Kevin Albios
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2DL4rG:ref

Google Ads Scripts Forum Advisor

unread,
Mar 5, 2021, 12:58:53 AM3/5/21
to adwords...@googlegroups.com

Hi,

 

Thanks for providing the requested information. I am Harry, teammate of Mak on the Google Ads Scripts.

 

Can you kindly confirm that you are still encountering the same issue at your end? It does seem that the succeeding executions worked as expected. Was there any ads that was left out which was supposed to be paused cause by the error? Any other information is highly appreciated so that I can take a look at the issue further.

 

Thanks,

Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2DL4rG:ref

Pooridon Rattnapairote

unread,
Mar 8, 2021, 3:51:44 AM3/8/21
to Google Ads Scripts Forum
Thank you for checking,

The error is only occurred only once (1 Mar 21)

Even, we still haven't found this error again, I would like to find a root cause of this error so that we could prevent it completely in the future
(i would like to replace the rules with this script, but only if there is no error )

Could you pleaseee investigate on what causing error on that period?

Thank you in advance
Tong

Google Ads Scripts Forum Advisor

unread,
Mar 8, 2021, 4:53:32 AM3/8/21
to adwords...@googlegroups.com

Hi Tong,

 

Thanks for coming back. The error: "Another task is also trying to change this entity" is caused by changes that are being made at the same time. May it be via UI, rules or scripts. I would suggest that you recreate and re-authorize (reschedule if necessary) the script to see if it would still encounter the issue. If the issue still persists, kindly let me know.

Pooridon Rattnapairote

unread,
Mar 8, 2021, 5:10:05 AM3/8/21
to Google Ads Scripts Forum
Hi there,

Thanks again for a prompt reply.

I've checked change history during that period
the script ran on those entity around 1 Mar, 23.03 GMT+7

There is no other script/rule ran at the same time (there is a rule set to run on these entity at 2 Mar, 00.15 AM as a safety)
Also, there is a bid change on the ad group level done at 23.06 GMT+7 (around 3-4 mins later)

I'm not sure is it possible that change on ad text and ad group could be overlapped
any idea? so i can reproduce the case accurately.

Google Ads Scripts Forum Advisor

unread,
Mar 9, 2021, 1:34:26 AM3/9/21
to adwords...@googlegroups.com

Hi Tong,

 

Thanks for providing your observations. Upon further checking, your script does process same entities at the same time and for some instances it would occur to an error. You can improve your script to make sure it does not handles the same entities and process them simultaneously. I would suggest that you separate the parts where you enable and pause entities. For example, separate them into two scripts or into two separate code blocks.

 

Let me know if you have other questions.

Pooridon Rattnapairote

unread,
Mar 9, 2021, 3:17:43 AM3/9/21
to Google Ads Scripts Forum
Hi

the pause and enable function have been done action to a different entities

pause only ads with label contain 'pause dd/mm/yyyy'
enable only ads with label contain ''enable dd/mm/yyyy'

so i'm a bit confused how is that can process on the same entities, since those labels are on the different entities

Google Ads Scripts Forum Advisor

unread,
Mar 9, 2021, 5:23:06 AM3/9/21
to adwords...@googlegroups.com

Hi Tong,

 

My previous statement was merely a suggestion to possibly mitigate the issue to occur. Nevertheless, if you don't think that it would not help in anyway and considering that we can't replicate the error on our side, kindly try to add a logger statement to log the ad IDs with a caption of the method (enabled or paused) on every instance of when you are pausing and enabling ads to see if it really handles the same entities simultaneously.

 

Let me know the results on your end.

Pooridon Rattnapairote

unread,
Mar 9, 2021, 5:28:05 AM3/9/21
to Google Ads Scripts Forum
Actually, that's the way I haven't tried yet.

Thank you for pointing it out. I'll definitely test that and let you know if there is any update

Much Appreciated!
Reply all
Reply to author
Forward
0 new messages