starting a process when other is done

starting a process when other is done

Post by jose quesad » Sun, 17 Dec 2000 11:46:46



I'm downloading, preprocessing, and indexing some newspapers;

I have a crontab like this:

#nation-wide
58 2 * * 0-6 /scripts/DownloadNewspapers.pl www.nytimes.com

#preprocessing  stuff here
*****
#indexing stuff here
*****

Note:DownloadNewspapers.pl is spawning several wget (a spider) background
processes.
I would like to start preprocessing when all the wget stuff is done.

I need  the preprocessing process starting ONLY when the download process
has ended. I can use top to see is DownloadNewspapers.pl
is still alive or not, but this imply to create a script that is only
'hearing' processes... and has to be working the whole day, like a daemon.

Does anybody have a better, more elegant solution? (I'm sure that there must
be a Unix trick to do that...)

Thanks in advance,

Jose

 
 
 

starting a process when other is done

Post by Barry Margoli » Mon, 18 Dec 2000 15:31:47




>I'm downloading, preprocessing, and indexing some newspapers;

>I have a crontab like this:

>#nation-wide
>58 2 * * 0-6 /scripts/DownloadNewspapers.pl www.nytimes.com

>#preprocessing  stuff here
>*****
>#indexing stuff here
>*****

>Note:DownloadNewspapers.pl is spawning several wget (a spider) background
>processes.
>I would like to start preprocessing when all the wget stuff is done.

>I need  the preprocessing process starting ONLY when the download process
>has ended. I can use top to see is DownloadNewspapers.pl
>is still alive or not, but this imply to create a script that is only
>'hearing' processes... and has to be working the whole day, like a daemon.

Why don't you just write a single script that runs DownloadNewspapers.pl
followed by the preprocessing and indexing stuff?

--

Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.