* Mysterious cron output
@ 1999-07-12 4:00 Hans Westerback
[not found] ` <378ad4c8.4200909@netnews.worldnet.att.net>
0 siblings, 1 reply; 3+ messages in thread
From: Hans Westerback @ 1999-07-12 4:00 UTC (permalink / raw)
Hi,
I recently took over a couple of Digital systems, both 3.2G and 4.0D,
which for some reason sends messages from crontab jobs to root, like
this:
Default startup...
Starting ibxd using X.500 only
*************************************************
Cron: The previous message is the standard output
and standard error of one of your cron commands.
The line in cron is as follows:
00,10,20,30,40,50 * * * * /usr/local/bin/supervision >>
/var/tmp/supervision/supervision.log 2>&1
Can something in the script being run override the redirection? Or how
can I get mail with this redirection? Can something in the setup of cron
change this?
How about the cron log file? It just says on a 3.2G system:
! *** cron started *** pid = 692 Mon Jan 11 17:49:35 1999
! *** cron started *** pid = 752 Wed Apr 07 16:58:25 1999
! *** cron started *** pid = 724 Thu Jun 17 11:11:48 1999
And on a 4.0D system:
! *** cron started *** pid = 547 Sat May 22 20:48:08 1999
! Max job limit set to 25 jobs Sat May 22 20:48:08 1999
! Log level set to 4 Sat May 22 20:48:08 1999
Where is this log level set, and explained? Couldn't find it in the man
pages?
Thanks,
Hans
--
Hans Westerback * E-Mail : hans.westerback@edt.ericsson.se
LM Ericsson Data AB * Memo : edt.edthwes
G�talandsv�gen 230 * Phone : +46-8-7262652
S-125 82 Stockholm * Fax : +46-8-7217131
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <378ad4c8.4200909@netnews.worldnet.att.net>]
* Re: Mysterious cron output [not found] ` <378ad4c8.4200909@netnews.worldnet.att.net> @ 1999-07-13 4:00 ` John G Dobnick 1999-07-13 4:00 ` Hans Westerback 1 sibling, 0 replies; 3+ messages in thread From: John G Dobnick @ 1999-07-13 4:00 UTC (permalink / raw) >>I recently took over a couple of Digital systems, both 3.2G and 4.0D, >>which for some reason sends messages from crontab jobs to root, like >>this: >> [.. snip...] >> >>The line in cron is as follows: >> >>00,10,20,30,40,50 * * * * /usr/local/bin/supervision >> >>/var/tmp/supervision/supervision.log 2>&1 >> >>Can something in the script being run override the redirection? Or how >>can I get mail with this redirection? Can something in the setup of cron >>change this? Shells process redirection in the order encountered (or at least /bin/sh does so). Thus... you redirect standard output to the file, and _then_ redirect the STDERR stream back to the STDOUT stream -- which is still the original STDOUT -- namely your "terminal", _not_ the redirected stream. Try doing the "2>&1" before the ">>" and see what happens. It works for me. -- John G Dobnick "Knowing how things work is the basis Information & Media Technologies for appreciation, and is thus a University of Wisconsin - Milwaukee source of civilized delight." jgd@csd.uwm.edu ATTnet: (414) 229-5727 -- William Safire ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Mysterious cron output [not found] ` <378ad4c8.4200909@netnews.worldnet.att.net> 1999-07-13 4:00 ` John G Dobnick @ 1999-07-13 4:00 ` Hans Westerback 1 sibling, 0 replies; 3+ messages in thread From: Hans Westerback @ 1999-07-13 4:00 UTC (permalink / raw) Yes, that's just my point: The redirection is there in the crontab, but I still get the mail! Rgds, RobertSmith@kill.spam.ork wrote: > If I recall from the man pages on cron & crontab..... > By default Standard Output & Errors are, if not redirected, sent to > the owner via mail. > > So therefore, if you don't redirect the output then you will receive > an e-mail for the cron. > > If you were to remove the ">>/var/tmp/supervision/supervision.log > 2>&1" from the line then you will get whatever would of gone into that > log file sent to you by mail. > > -- Hans Westerback * E-Mail : hans.westerback@edt.ericsson.se LM Ericsson Data AB * Memo : edt.edthwes G�talandsv�gen 230 * Phone : +46-8-7262652 S-125 82 Stockholm * Fax : +46-8-7217131 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-07-13 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-07-12 4:00 Mysterious cron output Hans Westerback
[not found] ` <378ad4c8.4200909@netnews.worldnet.att.net>
1999-07-13 4:00 ` John G Dobnick
1999-07-13 4:00 ` Hans Westerback
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox