How to implements Queueing Using Shell scripts


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to implements Queueing Using Shell scripts
# 1  
Old 05-04-2010
How to implements Queueing Using Shell scripts

I want to implement a control mechanism using Shell scripts .The intention is to have controlled number of jobs running in parallel

External process will kickstart 40 jobs in parallel .All the 40 jobs will call the same generic script with different parameter values .But at a time only 2 should run ( In extended version of this i will dynamically change the value say to 5 or 10 ) .

What i tried to implement was , with in the generic script i will create a ctl file (CTL files names are unique with same extension) If the number of CTL files is more than or equal to ( -ge 2) , then i wil sleep the job .Else will run it .The problem is when 40 jobs comes back from sleep at the same time , the chances of two or process taking control is high .How can i restrict it ?
# 2  
Old 05-04-2010
Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

Proceed here:

https://www.unix.com/shell-programmin...#post302418490

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Awk Script that implements a report writer

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write an awk script that implements a report writer. Here is what I need to do: The report computes summary data... (9 Replies)
Discussion started by: bravens52
9 Replies

2. Homework & Coursework Questions

awk script that implements a report writer

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: The script should compute the sale amounts per associate for the year 2009 and print them in a sorted list ranked... (1 Reply)
Discussion started by: Jeffthrow5
1 Replies

3. Shell Programming and Scripting

calling 'n' number of shell scripts based on dependency in one shell script.

Hello gurus, I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script. i m looking for something like this call 3.1; If 3.1 = "complete" then call 3.2; if 3.2 = ''COMPlete" then call 3.3; else exit The... (1 Reply)
Discussion started by: shashi369
1 Replies

4. HP-UX

How Unix implements virtual memory?

Hello! just wanna ask if how UNIX implements virtual memory, and how it handles page faults, working sets, page sizes and how it reconciles thrashing issues? if you know some sources where I can have some idea, just post it here. thx (1 Reply)
Discussion started by: kjcruz
1 Replies

5. Homework & Coursework Questions

How Unix implements virtual memory?

Use and complete the template provided. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: The key to using memory most efficiently is virtual memory management. Consider both Windows and UNIX operating systems. Compare and contrast how each... (0 Replies)
Discussion started by: kjcruz
0 Replies

6. Shell Programming and Scripting

Queueing keystrokes

Hello, I have a ksh which can be run interactively with read etc waiting for input and so forth. Do you have an idea how can I invoke the ksh and supply a sequence of keystrokes that will feed the executable flow so that it will automatically run as if someone actually walked through one prompt... (7 Replies)
Discussion started by: gio001
7 Replies

7. AIX

Difference between writing Unix Shell script and AIX Shell Scripts

Hi, Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies

8. UNIX for Dummies Questions & Answers

Message from queueing system

Every time a job is deleted from a queue a message resembling the following is sent to the job owner's terminal or mailed to the job owner if the job owner is not logged on: Message from root on 'hostname' (UNKNOWN) ... Message from queueing system: Job number '#' has been... (0 Replies)
Discussion started by: alab
0 Replies

9. AIX

Cannot find answer - stop queueing messages?

My root mail fills up very quickly because we have hundreds of remote printers and whenever a job is deleted, moved or a printer is down, up, sidways (jk) the queueing system drops root and email. It fills up super fast and is causing a problem. Rembak is the backend but i cannot find a way... (2 Replies)
Discussion started by: albertaguirre
2 Replies

10. Shell Programming and Scripting

shell scripts

Hi! I have added a line into /etc/profile which looks like- date > $HOME/.lastloggedon This puts a file lastloggedon into everyones directory who has logged in recently. The trouble I am having is getting the information back out. I was hoping there was a command using find which brought... (1 Reply)
Discussion started by: karenshaw
1 Replies
Login or Register to Ask a Question