# Changing the queue for an already submitted PBS job [closed]

I have a job already submitted to a TORQUE queue. The system I submitted it on has several queues, and I want to change which queue I'm running it in. I found this question, which recommends the use of qalter, but qalter's man page doesn't have instructions for changing the queue.

EDIT: I tried qalter -q <queuename> <jobid> and I get an error message qalter: illegally formed job identifier: <queuename>

How can I change which queue a job is submitted to using a PBS system?

I know this is an old question, but the correct command to move a queued job from one queue to another in torque is "qmove" and not qalter.

From man page:

Usage: qmove destination job_identifier ...

Description:

To move a job is to remove the job from the queue in which it resides and instantiate the job in another queue. The qmove command issues a Move Job batch request to the batch server that currently owns each job specified by job_identifier. A job in the running state cannot be moved by the user.

• qmove is the only command that would work! – Alone Programmer Dec 24 '18 at 16:23

The command

qalter -q <new queue name> <jobid>

should work for already submitted jobs. For new jobs use the same syntax with qsub

qsub -q <new queue name> <scriptname>

Please note that if your job is already running, the qalter will not make it switch queues. Only if the running job gets interrupted and restarted, it will switch queue.

• This doesn't work on my machine. – Dan May 29 '13 at 21:37
• Are the angle brackets part of the syntax of the qalter command? – Dan May 29 '13 at 21:42
• @Dan: No, they are not. if you want to move the job with jobid 1234 to the queue named DansQueue, you should enter the command qalter -q DansQueue 1234. Make sure that you are allowed by your sysadmin to submit in that queue – GertVdE May 30 '13 at 6:50

In Torque only this works:

   qalter <jobid> -W queue=<new queue name>

• This is the only command that worked for me. Thanks! – Melanie Shebel Oct 8 '16 at 18:59