How to remove PENDING Batch Jobs?

317 views
Skip to first unread message

Miquel Isern Roca

unread,
Oct 20, 2021, 9:39:02 AM10/20/21
to AdWords API and Google Ads API Forum
I'm looking for a way to remove Batch Jobs that haven't yet been run. There's a limit of 100 `pending` and `running` Batch Jobs per customer and I would like to know a way I can clear these Batch Jobs in case I ever need to. If I don't remove them and I create more than 100 Batch Jobs I get the `BATCH_JOBS_PER_CUSTOMER` error back from Google.

I explored different approaches:

1. `MutateBatchJobRequest` seems to only allow the creation of Batch Jobs and Batch Job Operations.
2. `LongRunningOperation` gives the option to Cancel or Remove a Batch Job that's running. I can't obtain the `LongRunningOperation` before running the Batch Job so it's not a solution either.
3. Tried to remove the Operations from an existing Batch Job in order to run the `empty` Batch Job and get rid of it. Couldn't get this to work because I can't remove Operations from a Batch Job.

Is there a known way to do it? Or if a Batch Job with incorrect operations is created and we don't want to run it, the only way to get rid of it is to wait 7 days for it to be removed systematically?

Google Ads API Forum Advisor

unread,
Oct 21, 2021, 3:54:02 AM10/21/21
to miquel.i...@channable.com, adwor...@googlegroups.com
Hi Miquel,

Thank you for posting your concern.

It appears that there is currently no operation to remove batch jobs. With this, allow me to raise a feature request to my team about this, subject for review. The only workaround for now is to wait for 7 days for it to be removed.

For now, please follow our blog as we will post there relevant updates when become supported.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2QDj4r:ref

Miquel Isern Roca

unread,
Oct 21, 2021, 5:37:07 AM10/21/21
to AdWords API and Google Ads API Forum
Thanks for the quick reply.

I'll keep an eye on the blog to see when it becomes available.
In our opinion, it is quite an important feature to have available. A situation where we reach the limit of created Batch Jobs because of an unsuspected error and we can't push any new ones is frightening.

Google Ads API Forum Advisor

unread,
Oct 22, 2021, 1:17:10 AM10/22/21
to miquel.i...@channable.com, adwor...@googlegroups.com
Hi Miquel,

Thank you for your reply. I will also share your latest response to the feature request that I've created. Yes, please follow our blog for the meantime.

Let me know also if you have further questions.

wes...@channable.com

unread,
Jan 28, 2022, 2:20:16 AM1/28/22
to Google Ads API and AdWords API Forum
Just wanted to follow up here. We recently ran into an `InternalServerError` that we received from the API when trying to upload operation to a batch job. Because of this, we now have a `PENDING` batch job, and as far as we can tell, there is no way to get rid of this batch job because we cannot cancel it.

It seems quite the oversight to not allow canceling the batch job when users can get into this situation by errors thrown by the Google Ads API.

It is also not robust to just "pick up where you left off" in the batch job, because depending on when the error happened, it currently seems impossible to know which operations are actually uploaded (I believe we can only get the number and not the operations themselves).

Is there anything we can do here besides abandoning the batch job and hoping that we don't keep getting Internal Server Errors resulting in us reaching the limit of the amount of batch jobs we can have "active"?

Google Ads API and AdWords API Forum

unread,
Jan 31, 2022, 3:44:51 AM1/31/22
to Google Ads API and AdWords API Forum

Reposting the last inquiry (link to actual inquiry) from the forum as it wasn't routed to our support queue.


Cheers,

Ernie John B. Tacata

Google Ads API Team

Google Ads API and AdWords API Forum

unread,
Jan 31, 2022, 4:35:19 AM1/31/22
to Google Ads API and AdWords API Forum
Hi Wesley,

Thank you for your patience here.

Allow me to share the update that I received from the team. Instead of using Batch Job, I would suggest to explore GoogleAdsService::Mutate so that you don't have to wait for the batch job to cancel when you are encountering errors.

If this workaround is not suitable on your use case, then please provide more details to why you need this feature. Also, you can provide the complete request and response logs, along with the request-id, so that we can investigate the issue. You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Ernie John B. Tacata
Google Ads API Team

Reply all
Reply to author
Forward
0 new messages