Skip to main content

mr job cancel

Stop an active download job. Cancel only works while the job is still in progress (pending, downloading, or processing); the server rejects cancellation of jobs that have already finished, been cancelled, or are paused. 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, or processing 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