Date: Wed, 8 Nov 2006 22:12:12 +1100 From: Norberto Meijome <freebsd@meijome.net> To: nicky <nicky@valuecare.nl> Cc: Andrew Pantyukhin <infofarmer@FreeBSD.org>, freebsd-questions@FreeBSD.org Subject: Re: Parallel shell scripts. Message-ID: <20061108221212.430b2ec2@localhost> In-Reply-To: <4551B8D2.3020502@valuecare.nl> References: <4551AC4A.2000108@valuecare.nl> <cb5206420611080221n3fde2772h3569a8ce8f9920dc@mail.gmail.com> <4551B8D2.3020502@valuecare.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 08 Nov 2006 12:00:34 +0100 nicky <nicky@valuecare.nl> wrote: > The whole idea is this. I have to extract two different databases to csv > files. One takes about an 1 hour, the other 1.5 hours. The problem is my > time window, which is 2 hours. So extracting one after the other is not > an option. After both extractions are complete, it should load the csv > files into a target database. Andrew has a point - I think you are going the *very* hard way around... an easier way , i think, may be : dump1.sh : handles extraction of first DB. Checks its own return status AND write to a tmp file flagging success or failure (i dont know, dump1.ok or dump1.bad... or different content which you can cat / grep for...) dump2.sh : same as dump1, with obvious differences. loader.sh : loops, check for both .ok flags , wait if not there yet and handle as it should. Launch a term, run screen (if running on a remote server..this would be a must, i think...) , launch dump1.sh, then from another session, dump2.sh . Or use cron if you dont like screen. and , of course, launch loop.sh to monitor them both... may have more components...but it's far easier to get it right, IMHO _________________________ {Beto|Norberto|Numard} Meijome "He uses statistics as a drunken man uses lamp-posts ... for support rather than illumination." Andrew Lang (1844-1912) I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061108221212.430b2ec2>