Skip to main content

mr job cancel

Stop a job that has not finished. Cancel works while the job is pending, downloading, processing, or paused; the server rejects cancellation of jobs that have already completed, failed, or been cancelled, answering HTTP 409 Conflict. On success the server marks the job cancelled and leaves it in the queue for inspection.

Use jobs list to see which jobs are eligible -- any job with a status other than pending, downloading, processing, or paused cannot be cancelled.

Usage

mr job cancel <id>

Positional arguments:

  • <id>

Examples

Cancel a specific job

mr job cancel a1b2c3d4

Pipe through jq to cancel every active job

mr jobs list --json | jq -r '.jobs[] | select(.status == "downloading" or .status == "pending") | .id' | xargs -I {} mr job cancel {}

Flags

This command has no local flags.

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Output

Object with status set to "cancelled"

Exit Codes

0 on success; 1 on any error

See Also