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.
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?
----------------------------------------------------------------------
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
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
> 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/
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