batch_rerun
Restart an ended Batch job to recover failed or unstarted tasks while carrying over completed results, or rerun selected task statuses or every task with full mode.
Instructions
Start a new run of a Batch job whose latest run ended (completed, stopped or failed). By default it reruns only the tasks that failed or never started (status ["failed", "pending"]), and carries the others' results over: the recovery after a run that failed on credits or was cancelled. Pass status to pick other task statuses, or full:true to scrape every task again. Rerun tasks are billed like new ones.
A rerun of only some tasks works up to 10 days after the run started (BATCH_RERUN_WINDOW_EXPIRED after that; full:true still works). BATCH_NO_MATCHING_TASKS: no task has those statuses. BATCH_RUN_NOT_FINISHED: the latest run is still in flight. Sends an Idempotency-Key, so a retry never starts two runs. Returns the new run at once (it writes its tasks first, ingesting:true); call batch_wait.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | Rerun every task, not only some (default false) | |
| job_id | Yes | Batch job id returned by batch_create or batch_list | |
| status | No | Task statuses to rerun (default ["failed", "pending"]). Ignored with full:true. | |
| idempotency_key | No | Sent as the Idempotency-Key header, up to 128 characters; generated per call when unset. Reusing a key with the identical request within 24 hours returns the original response instead of doing it again; with a different request it is BATCH_IDEMPOTENCY_CONFLICT. |