Skip to main content.
home | support | download

Back to List Archive

Re: Error running swish-e as cron job

From: Brad Miele <brad(at)>
Date: Wed Apr 14 2004 - 16:14:31 GMT
here is what i do...

disclaimer 1: don't try this at home, your resukts may varie, this
product explodes at high speed, etc...

disclaimer 2: my shel script skills are weak, and i am not too bright

that aside,

i have a directory called batchfiles, and in it i put all of my little files. so it looks like this

mobius:apache {345} ls -la indexing/batchfiles
total 24
drwxr-xr-x  2 nobody  www  512 Mar  1 11:27 .
drwxr-xr-x  7 nobody  www  512 Mar 18 22:49 ..
-rwxr-xr-x  1 nobody  www   91 Mar  1 11:09
-rwxr-xr-x  1 nobody  www  176 Mar  4 12:32
-rwxr-xr-x  1 nobody  www   93 Feb 12 14:56
-rwxr-xr-x  1 nobody  www  196 Mar  1 11:08

a sample of one of these scripts would be:

/usr/local/bin/swish-e -c /usr/local/apache/indexing/conf/master_ipn.conf -S prog

make sure that all of your paths and stuff are set correctly.

then, in another directory (don't put it in the same directory!!!!) i have
a script called which looks like this:



RUN=`ps ax | grep swish-e| grep -v grep | wc -l`;

if [ ${RUN} -gt 0 ]; then
        echo already running
        exit 1

cd /usr/local/apache/indexing/batchfiles
for x in `ls | grep .sh`; do
/bin/sh ${x}


then i run from cron.

so whenever i have a script that works, i put it in the directory.

hope that helps...

 Brad Miele
 Technology Director
 (207) 828-8787 x110

 "I refuse to have a battle of wits with an unarmed person."

On Wed, 14 Apr 2004, Jody Cleveland wrote:

> > make sure that the path variable is set at the top of your crontab:
> >
> > PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
> I checked that, and it was correct.
> > I generally write shell scripts that run all of my swish
> > stuff and then run those from crontab, i think it is a little cleaner.
> 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?
> Jody
Received on Wed Apr 14 09:14:32 2004