Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* redirecting STDERR and crontab scripts
@ 1994-11-18 15:47 Eric Lease Morgan
  1994-11-21 15:54 ` Peter da Silva
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Lease Morgan @ 1994-11-18 15:47 UTC (permalink / raw)




How do I redirect STDERR in crontab scripts?

I have the following crontab script:

  30 3 * * * /bin/csh /usr/local/wais/bin/index all >& /usr/users/Eric/index.log

This script is intended to reindex my WAIS server data. As you
may or may not know, the WAIS indexer creates *voluminous*
output. Since I use the csh, the command: 

  /usr/local/wais/bin/index all >& /usr/users/Eric/index.log

works great from my command line. But when I run this script
from my crontab file, root reports an error:

  sh: /usr/users/Eric/index.log: bad number

If I change my crontab script to:

  30 3 * * * /bin/csh /usr/local/wais/bin/index all >& 2

I get a HUGE file in my mailbox.

How do I run a crontab script and redirect the STDERR to a
file in my directory, without getting anything sent to my
mailbox?

Eric Lease Morgan
NCSU Libraries
eric_morgan@ncsu.edu
http://www.lib.ncsu.edu/staff/morgan/




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-11-21 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-11-18 15:47 redirecting STDERR and crontab scripts Eric Lease Morgan
1994-11-21 15:54 ` Peter da Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox