From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,e3c504d0899b76fb,start X-Google-Attributes: gidf678f,public X-Google-Thread: fee84,e3c504d0899b76fb,start X-Google-Attributes: gidfee84,public From: shawn.hose@gsfc.nasa.gov (Shawn Hose) Subject: cron problem - redirects stderr *and* stdout Date: 1996/05/31 Message-ID: <4omps1$430@post.gsfc.nasa.gov>#1/1 X-Deja-AN: 157722084 organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA mime-version: 1.0 newsgroups: comp.unix.osf.misc,comp.unix.osf.osf1 I am currently running DUnix 3.2c, Dec Alpha 2100 and 1000 I have a cron job that runs every nite and although I redirect stderr to dev/null stdout gets redirected as well. It looks like this: 0 5 * * 2,3,4,5,6 /var/spool/cron/scriptfiles/myscript 2>/dev/null The script file that runs mails me a message if "a certain file" is found. If "the file" is not found it exits. The problem is , if I don't redirect stderr in the crontab file then I get mailed an empty mail message when "the file" is not found. If I do redirect stderr as noted above cron redirects stderr *and* stdout (the mail message). Note if I run this same command (./myscript 2>/dev/null) from the command line instead of cron it works fine. Any ideas would be appreciated! Please e-mail.