Skip to main content.
home | support | download

Back to List Archive

Re: Error running swish-e as cron job

From: Greg Fenton <greg_fenton(at)>
Date: Wed Apr 14 2004 - 16:04:22 GMT
--- Jody Cleveland <> wrote:
> Right now, I've got 4 separate cron jobs, one for each site I have.
> Is there a way to write a script that will do multiple indexes? Or,
do I
> need a separate one for each site I index?

In a single shell script, you can call swish-e multiple times:



cd /path/to/search1/dir
swish-e -c search1.conf -S prog

cd /path/to/search2/dir
swish-e -c search2.conf -S fs

cd /path/to/search3/dir
swish-e -c search3.conf -S prog

Then you simply call this shell script from your cron job.

Of course, you'd want to have tests in there to handle errors.  For
example, you might put the following code right after each call to

   if [ $? != 0 ];
       echo "I got an error!"
       exit 1

Hope this helps,

Greg Fenton

Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
Received on Wed Apr 14 09:04:22 2004