Checking the Status of a Task

The Ant Migration Tool is retired with Spring ’24. The tool continues to function for future API versions but isn’t updated with new functionality and isn’t supported. To manage metadata changes, switch to Salesforce CLI for a modern, supported developer experience.

Note

When you run a target, the Ant Migration Tool outputs the request ID for each deploy or retrieve task included in the target. You can use the request ID to check the status of a deploy or retrieve task. This is particularly useful if a client is running for a long time and there is a network issue that breaks the connectivity between the Ant Migration Tool on your machine and Salesforce.

To check the status of a run target, use the following command:

ant -Dsf.asyncRequestId=requestID targetName

Use the requestID that was printed out when you ran the target. For example, if you run the deployZip target, you can run the following command to check the status of the retrieval:

ant -Dsf.asyncRequestId=04sx00000002aGuAAI deployZip

You should not use this command with targets that contain multiple retrieve or deploy tasks. You should not use this command with the bulkRetrieve task also as this task batches retrievals in multiple requests.

Note

To track the status of deployments from within Salesforce, from Setup, enter Deployment in the Quick Find box, then select Deployment Status.