The first script is scheduled in a Cron job to be run every morning at 6 AM. In the script, after the "extractFile.sh" process is completed, along with "loadFiles_new.sh", loadFiles_old.sh should also be run. That means, loadFiles_new.sh and loadFiles_old.sh should be kicked off at the same time. And the should be kicked off, only after the extractFile.sh job is completed. This whole script has to run automatically, without any manual intervention.
In a nutshell, the process is like this.... According to the scheduled time, that is 6 AM in the morning, the script will be run.. once the "extractFile.sh" job is completed, "loadFiles_new.sh" will be run.. At the same time when "loadFiles_new.sh" process has begun, "loadFiles_old.sh" should also be kicked off. Please help me in writing a logic on how to coordiante these two processes to be run in parallel?
Can someone help me out in cracking this...
Help is appreciated. Thanks in advance!!
This coordinates three scripts 1.sh, 2.sh, 3.sh the way you describe
This runs 1.sh, then runs 2.sh and 3.sh at the same time and waits until they both finish.
When the process starts, it executes 1.sh and when that is complete, it spawns a new process for 2.sh (caused by the & at the end of the line), and then immediately spawns 3.sh for the same reason.
The original process then waits for both of the spawned processes to complete.
I tried running the two processes in parellel, by running them in the background. But, now, the issue is that it is reducing the performance..
If I run them in the foreground, they take only 1 minute to finish. but, if I run them in the bg, they are like taking more than 20 minutes to finish.
Can I improve the performance of the background processes. Is there any way, that I can achieve this.
I want to check how many processes are running with same names and get their respective counts.
ps -ef|grep -Eo 'process1|process2|process3| '|sort -u | awk '{print $2": "$1}'
Output would look like :
$ ps -ef|grep -Eo 'process1|process2|process3| '|sort | uniq -c | awk '{print $2":... (8 Replies)
Hi All!
I am trying to get sendmail to work but unsuccessfull...when I run ps -ef | grep sendmail
root 10578 10561 0 11:01:24 pts/1 0:00 grep sendmail
I do not see its processes
When I run the following commands:
bash-3.00# svcs sendmail
svcs: Pattern 'sendmail' doesn't match... (9 Replies)
Hi can anybody help me regarding this..
i want know the output of ps -ef with explanation.
how can we know the running processess.
this is the output of ps -elf
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
19 T root 0 0 0 0 SY ... (1 Reply)
I'm doing a script with the Shell. I need that it only show the number of running processes.
Ex:
echo "There are `command` running processes"
Thnx!
Pd: Sorry the idiom. I'm spanish. (5 Replies)
I'm doing a script with the Shell. I need that it only show the number of running processes.
Ex:
echo "There are `command` running processes"
Thnx!
Pd: Sorry the idiom. I'm spanish. (2 Replies)
I have a script that runs continuously and will deliver a file to multiple servers via scp. On occasions one of the scp's will hang and as a result not complete in sending the remaining files and not loop around again.
If I run the scp commands with a & they'll complete, but I want to make sure... (2 Replies)
Can we run a script in nohup which calls another script in nohup.
eg
Script1.sh
#Script1 start
nohup script2.sh
.
.
.
#end script1.sh
Now can I do this
nohup script1.sh
Also is all scheduled processes (crontab entries) will run as nohup?
Would appreciate if any one can... (3 Replies)