By default, this command shows the jobs finished in the last 24 hours. The output is limited to 10,000 jobs. To find out how many jobs are displayed for your cluster, run the following command:
scontrol show config | grep -E "MaxJobCount|MinJobAge"
Output for default settings:
MaxJobCount = 10000MinJobAge = 86400 sec
To list all jobs that were run on the cluster, use the sacct command.
You can see the current job state in the STATE column when you list jobs with squeue or in the JobState parameter when you get job details with scontrol show job(s). Some of the common job states include:
You can requeue a job, which means that the job is terminated and returned to the queue. It restarts automatically when the resources are available. Run the following command to requeue a job:
scontrol requeue <job_ID>
A requeued job keeps the same job ID. If your job writes some data at paths that depend only on the job ID, the data from the previous attempt may be overwritten by the requeued job.
In Soperator clusters, some failed jobs are requeued by default. To check this setting for your cluster, run the following command:
scontrol show config | grep JobRequeue
Output for default settings:
JobRequeue = 1
You may want to prevent a requeued job from being scheduled again automatically. To requeue a running job and put it on hold until you explicitly allow it to be scheduled, run the following command:
scontrol requeuehold <job_ID>
To requeue and put on hold a job that hasn’t started yet, run the following command:
scontrol hold <job_ID>
To allow the job to be scheduled again as soon as there are available resources, run the following command: