Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-10-2012, 09:00 AM   #1
LQ Newbie
Registered: Apr 2012
Posts: 1

Rep: Reputation: Disabled
How to change the queue name of all the scheduled jobs in Linux?

I have an application where jobs are fired sequentially with a set priority. Now it is fired and I am in midway. Still there are lot of jobs which are pending and are queued up. Now I want to change the queue name of all the scheduled jobs to the queue which is not loaded much (I know which one to load). Doing bmod -q <queue_name> <job_id> is not possible as there are hundreds of jobs in line.
Can anyone suggest me a quick way to do this? I tried with something like this:

bjobs | cut -d' ' -f1 | sed '1d' | xargs bmod -q high

But this is not working. Any suggestions?
Old 04-11-2012, 09:22 AM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,517
Blog Entries: 15

Rep: Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470Reputation: 1470
When you say "not working" exactly what is happening?

It may be you need to do a for loop rather than piping into xargs:

for job in $(bjobs | cut -d' ' -f1 | sed '1d')
do bmod -q high $job
I'm not familiar with bmod so am not sure if your command syntax is correct. What happens if you pick a single job and run the bmod -q high on it?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with AT scheduled jobs for www-data gazza_d Linux - Server 1 08-22-2011 10:00 AM
[SOLVED] What happens to cron jobs scheduled to run when the PC is suspended? bonixavier Slackware 5 04-08-2011 12:52 AM
Apache/PHP: Executing 'at' scheduled jobs? bomix Linux - Software 11 01-23-2009 02:02 PM
LXer: Control the Duration of Scheduled Jobs in Linux LXer Syndicated Linux News 0 08-01-2007 10:31 PM
Cancel All Scheduled Jobs? Rv5 Programming 1 09-17-2004 09:39 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:03 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration