LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-10-2012, 08:00 AM   #1
achakradhare
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, 08:22 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

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

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

Code:
for job in $(bjobs | cut -d' ' -f1 | sed '1d')
do bmod -q high $job
done
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?
 
  


Reply



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 09:00 AM
[SOLVED] What happens to cron jobs scheduled to run when the PC is suspended? bonixavier Slackware 5 04-07-2011 11:52 PM
Apache/PHP: Executing 'at' scheduled jobs? bomix Linux - Software 11 01-23-2009 01:02 PM
LXer: Control the Duration of Scheduled Jobs in Linux LXer Syndicated Linux News 0 08-01-2007 09:31 PM
Cancel All Scheduled Jobs? Rv5 Programming 1 09-17-2004 08:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:00 AM.

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