Cron & Mail

Post Reply
Message
Author
Chriss

Cron & Mail

#1 Post by Chriss »

Hallo!

Ich habe einen Cronjob angelegt, der alle 2 minuten ausgeführt wird, jetzt bekomme ich als root alle
2 minuten eine Email, wie kann ich das Abstellen, bzw mit einen anderen Cron Job oder so, das Root Postfach
jedenTag einmal löschen?

Mit freundlichem Gruß
Chrsitian

ratte

Re: Cron & Mail

#2 Post by ratte »

Hi,

ueblicherweise unterdrueckt man die eMails, indem an jede Kommandozeile ein " 1>/dev/null 2>&1" angehaengt wird.

ratte

User avatar
max
Posts: 806
Joined: 14. May 2000 12:55
Location: Ruhrpott

Re: Cron & Mail

#3 Post by max »

gucke mal in /etc/crontab

man 5 crontab:
.
.

In addition to LOGNAME, HOME, and SHELL, cron(8) will look at MAILTO if it has any
reason to send mail as a result of running commands in ``this'' crontab. If MAILTO
is defined (and non-empty), mail is sent to the user so named. If MAILTO is
defined but empty (MAILTO=""), no mail will be sent. Otherwise mail is sent to the
owner of the crontab.
.
.
.

Gruss Max

Chriss

Re: Cron & Mail

#4 Post by Chriss »

Okay, danke

weis ich auch endlich wofür der scheiss bei dem anderen cronjob dahinter steht

Gruß
Christian

Chriss

Re: Cron & Mail

#5 Post by Chriss »

Und für den zweiten Tipp auch danke, werde ich mir gleich aufschreiben, damit ichs demnächst weiss, wenn ich es
all für alle mal abstellen will


Gruss Christian

Post Reply