LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

scancel

Cancel Slurm jobs by ID or filter

TLDR

Cancel a job by ID
$ scancel [job_id]
copy
Cancel all jobs from a user
$ scancel -u [username]
copy
Cancel all pending jobs
$ scancel -t PENDING
copy
Cancel jobs by name
$ scancel --name [job_name]
copy
Cancel a specific array task
$ scancel [job_id]_[task_id]
copy
Signal a job instead of cancelling
$ scancel -s [SIGTERM] [job_id]
copy

SYNOPSIS

scancel [options] [jobid_...]

DESCRIPTION

scancel cancels pending or running jobs in a Slurm cluster. Jobs can be cancelled by numeric ID, filtered by user, partition, state, or job name. Multiple job IDs can be specified on the command line.For job arrays, individual tasks can be cancelled using the `jobidtask_id` notation. Cancelled jobs are terminated and resources are released back to the cluster.

PARAMETERS

-u, --user username

Cancel all jobs owned by user
-t, --state state
Cancel jobs in specified state (PENDING, RUNNING, SUSPENDED)
-n, --name name
Cancel jobs with specified name
-p, --partition name
Cancel jobs in specified partition
-s, --signal signal
Send signal instead of SIGKILL
-A, --account account
Cancel jobs under specified account
-q, --qos qos
Cancel jobs with specified QOS
-i, --interactive
Confirm each cancellation
-v, --verbose
Verbose output

CAVEATS

Users can only cancel their own jobs unless they have administrator privileges. Cancelling running jobs may result in incomplete work. The default signal is SIGKILL; use -s to send a gentler signal first.

HISTORY

Part of Slurm workload manager, providing job control for HPC clusters.

SEE ALSO

squeue(1), sbatch(1), scontrol(1)

Copied to clipboard
Kai