Skip to Main Content

Modifying Jobs

Modify jobs prior to execution

Scontrol

Using the scontrol command, you can make changes to jobs while the job is running or pending in queue. For instance, to increase a job’s time limit – apparently as it approaches its initial submission deadline. Although, some SLURM directives cannot be updated during runtime. GPU , node, and memory allocations are examples of these.

$ scontrol update jobid=<jobid> timelimit=<new timelimit>

The format set is minutes, minutes:seconds, hours:minutes:seconds, days-hours, days-hours:minutes or days-hours:minutes:seconds.

Cancel jobs

To cancel a specific job:

scancel $JobID

To cancel all jobs owned by a user

scancel -u $USER
Controlling jobs

Prevent a pending job from being started:

scontrol hold $JobID

Release a previously held job (scontrol hold`):

scontrol release $JobID

To requeue (cancel and rerun) a particular job:

scontrol requeue $JobID