If a parent job is complete and contains failed files that can be retried, you can use the mgwutil retry-job command to create a retry sub-job to process these files.
Command format
mgwutil retry-job <job-name> [--access-secret]Parameters
Parameter | Required | Description |
job-name | Yes | The name of the job to retry. |
--access-secret | No | This parameter is optional if the source address is of type OSS, OSSINV, or Local. For other source types, such as S3 and QINIU, this parameter is required. The value is the AccessSecret for the source of the retry job. |
Examples
Retry an OSS, OSSINV, or LOCAL job
mgwutil retry-job mgwutil-jobRetry a job from a third-party (non-OSS) source
mgwutil retry-job mgwutil-job --access-secret *******Response
Success response
{
"Code": "success" ,
"StatusCode": 200,
"LogTime": "2025-12-25 17:51:37",
"Data": {
"WaitRetryJob": "test-1",
"RetryJob": "test-1_retry_20250715150504",
"RootJob": "test-1"
}
}Error response
{
"Code": "fail",
"StatusCode": 404,
"LogTime": "2026-01-16 13:59:25",
"ErrorMsg": "SDKError: StatusCode: 404 Code: NoSuchImportJob Message: The specified import job does not exist Data: {'AccessDeniedDetail':null,'Recommend':null,'ecCode':null,'hostId':'1****96****94***.cn-hangzhou.mgw.aliyuncs.com','requestId':'6969D3BD5CCFC933302EC1A4','statusCode':404} ",
"ErrorCode": "NoSuchImportJob",
"RequestId": "6969D3BD5CCFC933302EC1A4"
}Error codes
The error code indicates the error category. For more information, see the error message (ErrorMsg).
This error is one of the common error codes.
ErrorCode | Description |
JobIsInterrupted | The parent job is interrupted. |
JobIsNotFinished | The parent job is not finished. |
HistoryIsEmpty | The body returned by the |
HistoryNoNeedRetry | The value of the |
ResultNoNeedRetry | The result from the |
ResultNotReadyRetry | The result from the |
VerifyAddressUnavailable | The result from the |