Sponsored Content
Full Discussion: File queue script
Top Forums Shell Programming and Scripting File queue script Post 302141883 by krk_555 on Tuesday 23rd of October 2007 07:19:52 AM
Old 10-23-2007
Files Processing for the repeted time periods

Hi,
I need a help from any of you guys.

Actually my scenario is same but little bit different.

Iam having 3 Processes Pr1,Pr2 and Pr3 . I would like to run every process in every 15 Min and i want to load the files.
i.e
first
15 Min : Pr1 Should trigger
after next 15 min : Pr2 Should run
then next 15 min : Pr3 Should run
then next 15 min : again Pr1 should run before running it should check the status of Pr1 of the first cycle whether it is completed or not.If it is completed then it should run the Pr1 Process else it should check wheter the Pr2 and Pr3 Process are running or not. Basically the free process has to kick off.

Basically i use to get files in every 15min , so i want to process it through the above mentioned 3 Processses.

kindly help me on the same.


Script:


wait $var_band1

if [ $? -eq 0 ]

then

echo " Execute Band1 " &

var_band1=$!

echo "var_band1 : $var_band1"

sleep 3

echo "Waiting for the Next Hr Files "

else

echo "Still the Band1 Process is Running"

fi



wait $var_band2

if [ $? -eq 0 ]

then

echo " Execute Band2 " &

var_band2=$!

echo "var_band2 : $var_band2"

sleep 3

echo "Waiting for the Next Hr Files "

else

echo "Still the Band2 Process is Running"

fi



wait $var_band3

if [ $? -eq 0 ]

then

echo " Execute Band3 " &

var_band3=$!

echo "var_band3 : $var_band3"

sleep 3

echo "Waiting for the Next Hr Files "

else

echo "Still the Band3 Process is Running"

fi

Last edited by krk_555; 10-23-2007 at 08:27 AM..
 

10 More Discussions You Might Find Interesting

1. Programming

Queue

:confused: I have some problem with the technology Queue in Unix Can someone explain me the way queue is made and how it excute ,how it run Thanks in advance (1 Reply)
Discussion started by: iwbasts
1 Replies

2. Shell Programming and Scripting

shell script needed for mail queue notification

Hi shell experts, I would like to have a shell script running in a redhat server for monitoring the mailqueue status. I have already installed the qmHandle and I am using it to get a status of the mail queue in daily basis. I am executing the qmhandle in the cron. Now I am planning to execute... (10 Replies)
Discussion started by: Nightman
10 Replies

3. Shell Programming and Scripting

Need Help Writing Script To Email When Fax Queue Goes Down

I need a script that would email me when the fax queue goes down. How would I go about doing this? Our fax queue drops a few times a week and if I don't catch it fairly quickly it gets backed up really fast which makes the users a little unhappy... I am new to Unix-AIX. We are running... (6 Replies)
Discussion started by: ITAdmin08
6 Replies

4. AIX

AIX 6.1 Error - "A file, file system or message queue is no longer available."

Getting a strange error with a log file below. This is just a normal text log file that is written to by an application on the server. The applicaiton is down, however, I cannot read, remove or touch this file. The file shows on an ls listing but not an ls -al listing. The file system is JFS2... (0 Replies)
Discussion started by: troym72
0 Replies

5. AIX

AIX Bunch of printers queue creation script - HELP

I'd seek for help on how to create a bunch of printers in AIX 6.x or equal or above in one go – say like I have 35 printers to create in 4 different AIX Nodes every month – I currently create it manually like below:- How can I automatic this creation on all the 4-5 Nodes – not actually automatic... (3 Replies)
Discussion started by: shiv2001in
3 Replies

6. Shell Programming and Scripting

Detect if script starts from queue

Dear community, what I'm try to do is deny users to run a script without parameters from command bash, but the same script should run without parameters only from crontab. Example runs by crontab:*/5 * * * * /tmp/script.sh Here the normal execution starts every 5 minutes Example #1 runs by... (16 Replies)
Discussion started by: Lord Spectre
16 Replies

7. AIX

Help with clear printer queue script in AIX 5.3

Good day UNIX forum, could you help me with my clear printer queue script, i have problems with the consistency of this function, sometimes it works sometimes it doesn't. Thanks in advance } preRemovePrintQ(){ clear; echo; echo... (1 Reply)
Discussion started by: beware187
1 Replies

8. Shell Programming and Scripting

How to write Perl Script to Get MQ Queue Depth?

Hi , I got the following script from internet to display queue depth using Perl Script. However, when I execute it , im getting following error. Can anyone shed light on what is going wrong? #!/usr/bin/perl ## 07/23/01 ## Depth Inquiry sample program. ## Arguments: ## Connects to... (11 Replies)
Discussion started by: srkmish
11 Replies

9. Shell Programming and Scripting

Shell Script for Websphere MQ Queue Manager start/stop

Hello All, I am completely new to shell scripting. I had to write a script that starts and stop the queue manager in Websphere MQ. We are on Linux 64-bit patform. The script should stop the queue manager and all the processes related to websphere MQ. It should be a clean stop. Once the queue... (3 Replies)
Discussion started by: pady1224
3 Replies

10. Shell Programming and Scripting

MQ Queue Manager SSL Checking Script

Hello everyone, Newbie to the forum. I have a requirement for a script to check Queue Manager SSL certificates - However I have no previous scripting skills what so ever. I need a script which from high level point of view does the following: #For each Queue Manager on the server go to... (1 Reply)
Discussion started by: MQAdmin
1 Replies
echo(1B)					     SunOS/BSD Compatibility Package Commands						  echo(1B)

NAME
echo - echo arguments to standard output SYNOPSIS
/usr/ucb/echo [-n] [argument] DESCRIPTION
echo writes its arguments, separated by BLANKs and terminated by a NEWLINE, to the standard output. echo is useful for producing diagnostics in command files and for sending known data into a pipe, and for displaying the contents of envi- ronment variables. For example, you can use echo to determine how many subdirectories below the root directory (/) is your current directory, as follows: o echo your current-working-directory's full pathname o pipe the output through tr to translate the path's embedded slash-characters into space-characters o pipe that output through wc -w for a count of the names in your path. example% /usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w" See tr(1) and wc(1) for their functionality. The shells csh(1), ksh(1), and sh(1), each have an echo built-in command, which, by default, will have precedence, and will be invoked if the user calls echo without a full pathname. /usr/ucb/echo and csh's echo() have an -n option, but do not understand back-slashed escape characters. sh's echo(), ksh's echo(), and /usr/bin/echo, on the other hand, understand the black-slashed escape characters, and ksh's echo() also understands a as the audible bell character; however, these commands do not have an -n option. OPTIONS
-n Do not add the NEWLINE to the output. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), echo(1), ksh(1), sh(1), tr(1), wc(1), attributes(5) NOTES
The -n option is a transition aid for BSD applications, and may not be supported in future releases. SunOS 5.11 3 Aug 1994 echo(1B)
All times are GMT -4. The time now is 03:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy