Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

htdig: Can't run htmerge from cron?

4 views
Skip to first unread message

Ivo Jansch

unread,
Jan 22, 1999, 3:00:00 AM1/22/99
to
Hi,

I've put the rundig script in the root crontab file so it runs every
night.

However it fails at htmerge. I ran it in verbose mode, and this was last
nights output:

htmerge: Merging...
htmerge: 100:agc
(...)
htmerge: 1000:word
htmerge: Word sort failed

If I run the same script as root from the commandline everything works
fine, and the output is the following:

htmerge: Merging...
htmerge: 100:agc
(...)
htmerge: 1000:word

htmerge: Total word count: 1017
htmerge: 10
htmerge: 20
htmerge: 30

htmerge: Total documents: 39
htmerge: Total doc db size (in K): 1233


Why doesn't it work from crontab?

Greetings,
Ivo
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-...@sdsu.edu containing the single word "unsubscribe" in
the body of the message.

Graham Miller/Gmcs

unread,
Jan 22, 1999, 3:00:00 AM1/22/99
to
Hi there,

I can't remember the way it failed, but I had a problem similar. I found it
to be the umask value default for my system. By putting a 'umask=022' as
the first statement after the '#!/bin/csh' line, I found the problem went
away.

Hope this helps.
greyman
gra...@gmcs.com.au

Ivo Jansch <jan...@ce.philips.nl> on 22/01/99 06:05:33

I've put the rundig script in the root crontab file so it runs every
night.

However it fails at htmerge. I ran it in verbose mode, and this was last
nights output:

[snip]

Why doesn't it work from crontab?

----------------------------------------------------------------------

Edmond Abrahamian

unread,
Jan 23, 1999, 3:00:00 AM1/23/99
to

On Fri, 22 Jan 1999, Ivo Jansch wrote:

> Hi,


>
> I've put the rundig script in the root crontab file so it runs every
> night.
>
> However it fails at htmerge. I ran it in verbose mode, and this was last
> nights output:
>

There's an answer to this in the archives, and many proposed solutions.
The one that was simplest for me and that works is to use csh instead of
bash in the shell that does the job.

edmond

Gilles Detillieux

unread,
Jan 23, 1999, 3:00:00 AM1/23/99
to
According to Ivo Jansch:

>
> Hi,
>
> I've put the rundig script in the root crontab file so it runs every
> night.
>
> However it fails at htmerge. I ran it in verbose mode, and this was last
> nights output:
>
> htmerge: Merging...
> htmerge: 100:agc
> (...)
> htmerge: 1000:word
> htmerge: Word sort failed
>
> If I run the same script as root from the commandline everything works
> fine, and the output is the following:
>
> htmerge: Merging...
> htmerge: 100:agc
> (...)
> htmerge: 1000:word
>
> htmerge: Total word count: 1017
> htmerge: 10
> htmerge: 20
> htmerge: 30
>
> htmerge: Total documents: 39
> htmerge: Total doc db size (in K): 1233
>
>
> Why doesn't it work from crontab?

Well, if there isn't currently an FAQ entry for this, there really should be.
Here we go again:

There's a bug in vixie-cron in Red Hat 5.0 and 5.1, in its signal handling.
It seems to cause this error in htmerge consistently, when run from a cron
job, but could potentially cause similar problems with other jobs.

I recommend upgrading to the latest vixie-cron from the 5.2 distribution.

I've made it available on my web site, at:

http://www.scrc.umanitoba.ca/htdig/rpms/vixie-cron-3.0.1-26.i386.rpm
http://www.scrc.umanitoba.ca/htdig/rpms/vixie-cron-3.0.1-26.src.rpm

Geoff, maybe this should go under http://www.htdig.org/files/binaries/ too?

--
Gilles R. Detillieux E-mail: <grd...@scrc.umanitoba.ca>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba Phone: (204)789-3766
Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930

Anthony Peacock

unread,
Jan 23, 1999, 3:00:00 AM1/23/99
to
Hi,

> I've put the rundig script in the root crontab file so it runs every
> night.
>
> However it fails at htmerge. I ran it in verbose mode, and this was last
> nights output:
>

> [snip]


>
> Why doesn't it work from crontab?

One possibility is that the cron environment is not as rich as the login
environment. I would imagine from your error that something is relying on an
environment variable that is not set for the crontab task. Check man crontab
for details of the default path that cron tasks can expect.

Fare Thee Well
Anthony Peacock
CHIME, UCL Medical School
E-Mail: a.pe...@chime.ucl.ac.uk
WWW: http://www.chime.ucl.ac.uk/~rmhiajp/

Gilles Detillieux

unread,
Jan 23, 1999, 3:00:00 AM1/23/99
to
According to Edmond Abrahamian:

> On Fri, 22 Jan 1999, Ivo Jansch wrote:
> > I've put the rundig script in the root crontab file so it runs every
> > night.
> >
> > However it fails at htmerge. I ran it in verbose mode, and this was last
> > nights output:
> >
>
> There's an answer to this in the archives, and many proposed solutions.
> The one that was simplest for me and that works is to use csh instead of
> bash in the shell that does the job.

Using /bin/ash instead of /bin/bash is an even easier workaround than using
/bin/csh, as ash uses the same syntax (more or less) as bash uses. However,
that doesn't get to the root of the problem, which is that vixie-cron on
Red Hat 5.0 & 5.1 doesn't handle SIGCHLD correctly. This could potentially
be a problem with other cron jobs too. The best fix, IMHO, is to upgrade
vixie-cron to the one from the 5.2 distribution.

Using another shell seems to work around the problem, presumably because
these other shells reset SIGCHLD handling back to the default, which is
what cron should be doing. The bash shell doesn't seem to do this, so
you could potentially run into problems with any cron job that uses bash
(most do by default)! It just happens that htmerge is the most obvious
and consistent program to bring out this bug.

--
Gilles R. Detillieux E-mail: <grd...@scrc.umanitoba.ca>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba Phone: (204)789-3766
Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930

0 new messages