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!!
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.
nice sets the priorities for the processes. But, I want both the processes to run in parellel.. Is it possible to achieve this with the help of nice...