Reference

apex rerun

Re-run a completed run — all of it, only what failed, or one job — optionally resuming from the step that failed

apex rerun [options] [run]

With an API token, needs the permission actions:write.

Arguments
ArgumentDescription
[run]run id, #number, or "latest"
Options
OptionDescription
--repo <owner/repo>limit the run search to one repository
--failedonly the jobs that did not succeed, plus everything downstream of one
--job <id>one engine job id and its dependents (matrix legs re-run as a unit, like GitHub)
--resumestart each job at the step it failed at, where a snapshot of that failure survives
--debugenable step debug logging for the new attempt
--jsonprint the result as JSON

Examples

Re-run only what failed, and everything downstream of it.

apex rerun 4812 --failed

Resume each failed job at the step it failed at, where its snapshot survives.

apex rerun 4812 --failed --resume