Skip to main content
Published: February 01 2010, 3:40:00 PMUpdated: November 28 2020, 8:10:57 PM

I am unable to submit a new job in Sandbox. When I try to submit a job, I am getting the error "Maximum of one job per job-type in non-terminated state". However, getJobStatus does not return any jobs in a non terminated state.

Maximum of one job per job-type in non-terminated state is allowed at any given time. Thus you will not be able to submit a new job of the same type if there is a job of the same type that hasn't finished processing.

In extremely rare cases, it might happen that the job originally submitted was dropped off from the processing queue and is marked as Failed although it is in the non-terminated state. This might be the case you are encountering.

The best way to get around this is to find the job that is in the non-terminated state. To do so make a call to getJobStatus. Narrow your search result by specifying the job type and the creation time filter. Also include the jobStatus filters as below.

Here is a sample request and response.

Notice that the jobID returned in the response, shows its status as Failed, but the completionTime field is not returned. Since this field is returned only if job processing has not completed, we can conclude that this job is the job in the non-terminated state. Abort the job and then you will be able to submit a new job.

 <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://www.ebay.com/marketplace/services">
   <soap:Header/>
   <soap:Body>
      <ser:getJobsRequest>       
        <ser:jobType>AddFixedPriceItem</ser:jobType>  
        <ser:creationTimeFrom>2010-01-06T02:44:10.000Z</ser:creationTimeFrom>
        <ser:creationTimeTo>2010-01-08T02:44:10.000Z</ser:creationTimeTo>
        <ser:jobStatus>Scheduled</ser:jobStatus>
        <ser:jobStatus>InProcess</ser:jobStatus>
        <ser:jobStatus>Failed</ser:jobStatus>
      </ser:getJobsRequest>
   </soap:Body>
</soap:Envelope>

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Header/>
   <soapenv:Body>
      <getJobsResponse xmlns="http://www.ebay.com/marketplace/services">
         <ack>Success</ack>
         <version>1.2.0</version>
         <timestamp>2010-02-01T22:09:52.720Z</timestamp>
         <jobProfile>
            <jobId>50000043873</jobId>
            <jobType>AddFixedPriceItem</jobType>
            <jobStatus>Failed</jobStatus>
            <creationTime>2010-01-06T02:44:10.000Z</creationTime>
            <errorCount>0</errorCount>
            <percentComplete>24.25</percentComplete>
            <inputFileReferenceId>50000080863</inputFileReferenceId>
         </jobProfile>
      </getJobsResponse>
   </soapenv:Body>
</soapenv:Envelope>

 

 

 

How well did this answer your question?
Answers others found helpful