>Given the following crontab entries, why is stderr from the script
>"monitor" still going to the console?
>#=================================================================
>11,31,44 16-6 * * 4-0 /usr/sbin/perf/pmr/monitor 300 > /dev/null 2>&1
>&
>11,31,44 16-6 * * 1-3 /usr/sbin/perf/pmr/monitor 300 > /dev/null 2>&1
>&
>9,17,38 3,7,11,15 * * 2,4 /usr/sbin/perf/pmr/monitor 300 > /dev/null
>2>&1 &
>9,17,38 4,8,12,16 * * 1,3,5 /usr/sbin/perf/pmr/monitor 300 > /dev/null
>2>&1 &
>#=================================================================
>How can I ensure that stdout _and_ stderr are both redirected to
>/dev/null, and that the ksh script "monitor" runs in the background
>correctly?
>Thanks,
>Bosco
What you have does redirect standout out and standard in. Be aware that cron
usually executes its jobs in the Bourne shell. The problem apparently is in
the contents of your scripts. If you're really getting console output, then
one or more of the commands in the script is writing to /dev/console, not to
standard output. Standard output of a cron script is, I believe, not defined,
but in some systems is caught and mailed to the owner.
You'd have to share more symptoms of what you mean by not "running in the
background correctly" if you want comments on that. It's kind of unusual to
run a cron script in the background, as you're doing. If it's supposed to be
a background process, set it up as a daemon.
Ray Robert
Three Star Software, Inc.
(503) 643-0774
FAX 526-0934