All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: How can I prevent cron from emailig some jobs output
@ 2003-01-20 10:19 Mikhail Romanenko
  0 siblings, 0 replies; 5+ messages in thread
From: Mikhail Romanenko @ 2003-01-20 10:19 UTC (permalink / raw)
  To: linux-admin

20.01.03 10:43:50, terry white <twhite@aniota.com> wrote:

>on "1-20-2003" "Mikhail Romanenko" writ:
>
>: Man cron reads: "... When executing commands, any output is
>: mailed to  the  owner of  the crontab ...". Does it mean cron
>: have no features to prevent such mailing or there is some way
>: to do it however?
>
>... what i tend to see from 'cron', are the errors it encounters.
>
>    are you seeing something different ...

You are right, it emails stderr output, that is why ... >/dev/null
(which I tried first without success) does not help.
... 2>/dev/null does the job.

Thank you guys for your help.
Mikhail.






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

* Re: How can I prevent cron from emailig some jobs output
  2003-01-20  4:57 Mikhail Romanenko
  2003-01-20  5:43 ` terry white
  2003-01-20  6:07 ` Glynn Clements
@ 2003-01-20 10:11 ` Toby Fisher
  2 siblings, 0 replies; 5+ messages in thread
From: Toby Fisher @ 2003-01-20 10:11 UTC (permalink / raw)
  To: Mikhail Romanenko; +Cc: linux-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 20 Jan 2003, Mikhail Romanenko wrote:

> I would like some cron jobs output do not be reported through
> email.
>
> Man cron reads: "... When executing commands, any output is
> mailed to  the  owner of  the crontab ...". Does it mean cron
> have no features to prevent such mailing or there is some way
> to do it however?

Strictly speaking, the cron man page is correct, it doesn't have a way to
redirect output, but your shell does.

For example:

0 4 * * * /usr/bin/testscrip 2>&1 >/dev/null

This runs the script, redirects standard error to standard out, then
redirects standard out to /dev/null.

This should do what you want.
This is, of course, using Bash or similar.  If you're using Csh then I'm
afraid I can't help you.

HTH

- -- 
Toby Fisher	Email: toby@tjfisher.co.uk
Tel.: +44(0)1480 417272	Mobile: +44(0)7974 363239
ICQ: #61744808
   Please avoid sending me Word or PowerPoint attachments.
   See http://www.fsf.org/philosophy/no-word-attachments.html

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

iD8DBQE+K8ttKl9qIwuqk+IRAk4gAJ9HebeJvEdlOYAhtQouERTesFzZTQCePuLj
TOzC8iTHZTtknmh/LOywaQM=
=bcct
-----END PGP SIGNATURE-----


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

* Re: How can I prevent cron from emailig some jobs output
  2003-01-20  4:57 Mikhail Romanenko
  2003-01-20  5:43 ` terry white
@ 2003-01-20  6:07 ` Glynn Clements
  2003-01-20 10:11 ` Toby Fisher
  2 siblings, 0 replies; 5+ messages in thread
From: Glynn Clements @ 2003-01-20  6:07 UTC (permalink / raw)
  To: mikhail; +Cc: linux-admin


Mikhail Romanenko wrote:

> I would like some cron jobs output do not be reported through
> email.
> 
> Man cron reads: "... When executing commands, any output is
> mailed to  the  owner of  the crontab ...". Does it mean cron
> have no features to prevent such mailing or there is some way
> to do it however?

If you redirect the command's output to /dev/null, there won't be any
output, hence no email.

-- 
Glynn Clements <glynn.clements@virgin.net>

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

* Re: How can I prevent cron from emailig some jobs output
  2003-01-20  4:57 Mikhail Romanenko
@ 2003-01-20  5:43 ` terry white
  2003-01-20  6:07 ` Glynn Clements
  2003-01-20 10:11 ` Toby Fisher
  2 siblings, 0 replies; 5+ messages in thread
From: terry white @ 2003-01-20  5:43 UTC (permalink / raw)
  To: linux-admin

on "1-20-2003" "Mikhail Romanenko" writ:

: Man cron reads: "... When executing commands, any output is
: mailed to  the  owner of  the crontab ...". Does it mean cron
: have no features to prevent such mailing or there is some way
: to do it however?

... what i tend to see from 'cron', are the errors it encounters.

    are you seeing something different ...


-- 
... i'm a man, but i can change,
    if i have to , i guess ...


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

* How can I prevent cron from emailig some jobs output
@ 2003-01-20  4:57 Mikhail Romanenko
  2003-01-20  5:43 ` terry white
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mikhail Romanenko @ 2003-01-20  4:57 UTC (permalink / raw)
  To: linux-admin

I would like some cron jobs output do not be reported through
email.

Man cron reads: "... When executing commands, any output is
mailed to  the  owner of  the crontab ...". Does it mean cron
have no features to prevent such mailing or there is some way
to do it however?

Of couse, I can do it using procmail, but if cron has such a
feature it would be better to use it instead of procmail or
another external program.

I use:
debian woody
kernel 2.4.18 custom
libc6 2.3.1-5
cron 3.0pl1-73

Thank you, Mikhail.




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

end of thread, other threads:[~2003-01-20 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-20 10:19 How can I prevent cron from emailig some jobs output Mikhail Romanenko
  -- strict thread matches above, loose matches on Subject: below --
2003-01-20  4:57 Mikhail Romanenko
2003-01-20  5:43 ` terry white
2003-01-20  6:07 ` Glynn Clements
2003-01-20 10:11 ` Toby Fisher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.