Check for Pending BatchJob

65 views
Skip to first unread message

priya bahuguna

unread,
Feb 23, 2016, 2:40:44 PM2/23/16
to AdWords API Forum
Hello,

We migrating from deprecated MutateJobService to BatchJobService. How can we check for Pending or processing Batch Job Status.  
Can a batch job in neither DONE nor CANCELED state regarded as a pending/processing job. Previously we were using BasicJobStatus.PENDING & BasicJobStatus.PROCESSING
to check the same.

Thanks,
Priya


Yin Niu

unread,
Feb 23, 2016, 2:56:19 PM2/23/16
to AdWords API Forum
Hi Priya,

You can poll the batch status after the job is submitted. Once the job status is DONE or CANCELLED, a downloadUrl will be returned. You can use the URL to download results. 

Thanks,
Yin, AdWords API Team. 

priya bahuguna

unread,
Feb 23, 2016, 4:05:17 PM2/23/16
to AdWords API Forum
Hi Yin,

Thanks for the reply. I have to check whether the job status is Pending or in Processing state. BatchJobStatus has 
values UNKNOWN, AWAITING_FILE,ACTIVE,CANCELING, CANCELED and DONE. Can a job which is NOT in DONE or CANCELLED be regarded as PENDING?

Regards,
Priya

Yin Niu

unread,
Feb 23, 2016, 4:13:30 PM2/23/16
to AdWords API Forum
Hi Priya, 

I see that you want to link the pending and processing state for MutateJobService to the BatchJobService jobStatus. 

If you look at the description of the status code, AWAITING_FILE is basically in pending state. While ACTIVE and CANCELING are for jobs that are being processed. 

priya bahuguna

unread,
Feb 23, 2016, 4:23:15 PM2/23/16
to AdWords API Forum
Hi Yin,

Thanks a lot Yin. That was clearly what I needed. My Bad, should have study the API docs carefully.

Regards,
Priya
Reply all
Reply to author
Forward
0 new messages