Cron and multiple scripts problem.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Cron and multiple scripts problem.
# 1  
Old 08-13-2009
Cron and multiple scripts problem.

Hello All,

I have 3 scripts namingly 1X 2X and 3X.
I have one directory ABC created which contains some 40 sub directories.
I have one input file in the below format.The input file resides in ABC directory.
Inputfile format;
subdirectoryname date
subdirectoryname1 date
subdirectoryname2 date
..
...
it is a normal text file.
Each subdirectory contains multiple files.
My 1X script will check for the input file if it finds the input file then it should trigger 2X script.
also it will check for the status of the 2X script.if it is running it should not trigger the script.
my 1X script will run for every five minutes.I set it as a cron job.
Now the problem is;
It is not processing all the subdirectories.
for example if the input file contains 5 entries i.e 5 subdirectory names then the script is processing only
3 subdirectories and existing. can you please help me to resolve the issue.
# 2  
Old 08-13-2009
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

+++++++++++++++++++++++++++++++++++++++++++++++++++++++




Please post your scripts that do not work here using the above mentioned CODE tags so we can have a look at it.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Execution problem with Cron: Script works manually but not w/Cron. Why?

Hello gurus, I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup is shown below: #!/bin/ksh db2... (3 Replies)
Discussion started by: okonita
3 Replies

2. Shell Programming and Scripting

Calling multiple scripts from another scripts

Dear all, I am working on script which call other shell scripts in a loop but problem is from second script am not able to come out. Here is the snippet:- #!/bin/bash HSFILE=/root/Test/Components.txt LOGFile=/opt/domain/AdminDomain/application/logs... (3 Replies)
Discussion started by: sharsour
3 Replies

3. UNIX for Dummies Questions & Answers

Execution problem in running multiple scripts

hi all, I have 3 individual scripts to perform the task . 2nd script should run only after the 1st script and 3rd script must run only after first 2 scripts are executed successfully. i want to have a single script that calls all this 3 scripts .this single script should execute the 2nd script... (1 Reply)
Discussion started by: Rahul619
1 Replies

4. UNIX for Advanced & Expert Users

Running multiple php scripts into one php only, cron mail alert problem...

hi, while separated they produce the usual mail alert and i can see the output... if i write into the php script: <?php system('php -f /var/www/vhosts/domain.com/httpdocs/folder/script1.php'); system('php -f /var/www/vhosts/domain.com/httpdocs/folder/script2.php'); system('php -f... (0 Replies)
Discussion started by: 7stars
0 Replies

5. Solaris

running scripts from cron

I need to run a script (from cron) that runs a second script. What worries me is that second script, when run from bash, upon finishing doesn't return to bash unless I press the 'Enter' key. I presume that's because last command in that script ends with & Could that be a problem for cron?... (2 Replies)
Discussion started by: orange47
2 Replies

6. Shell Programming and Scripting

Problem with ftp scripts and cron

Need some help / advice with the follow script... Basically i have an FTP server that connects to other ftp servers and sends and downloads files every few hours or so. There are 12 different accounts that all have 2 scripts each, one to send and one to receive. Below is an example send script... (1 Reply)
Discussion started by: mokachoka
1 Replies

7. Shell Programming and Scripting

Running scripts within scripts from cron

Hi all, I have set up a cron job which calls another shell script shell script which in turn calls a Java process. The cron tab looks so. 0,30 7-18 * * 1-5 /u01/home/weblogic/brp/bin/checkstatus.sh >> /u01/home/weblogic/logs/checkstatus.log The checkstatus.sh scripts looks like this. ... (4 Replies)
Discussion started by: sirbrian
4 Replies

8. UNIX for Dummies Questions & Answers

Script Problem-Processing multiple scripts

Hi All, I have four scripts to run. My 1st script will make script2 and script3 to run. I am setting a cron job for this script1 to run continuously. This script1 will check for 2 text files and based on the existance of those text files it will initiate the script2 and script3. Now my doubt... (2 Replies)
Discussion started by: RSC1985
2 Replies

9. Shell Programming and Scripting

help in cron scripts

Hi, i have scheduled my scripts in cron, some time the script doesn't runs ..which will impact me a lot, can some one help me such that mail has to come stating script has run successfully/unsuccessful any help will be appreciated.. thanks in advance, geeko (0 Replies)
Discussion started by: geeko
0 Replies
Login or Register to Ask a Question