Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cron emails abschaltbar?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
skibbi
Apprentice
Apprentice


Joined: 13 Apr 2004
Posts: 202
Location: Rostock - Germany

PostPosted: Thu Dec 16, 2004 12:37 pm    Post subject: Cron emails abschaltbar? Reply with quote

Hi,
ich hab vixie-cron bei mir installiert und immer wenn ich ein programm ausführen lasse, dass was an stdout sendet, bekomme ich eine email mit diesem inhalt.
Kann ich dies für einzelne cronjobs deaktivieren?

Mfg skibbi
Back to top
View user's profile Send private message
schmutzfinger
Veteran
Veteran


Joined: 26 Oct 2003
Posts: 1287
Location: Dresden/Germany

PostPosted: Thu Dec 16, 2004 12:40 pm    Post subject: Reply with quote

in /etc/crontab steht
Code:

MAILTO=root

wenn du das wegnimmst, dann stellst du alle mails ab. Für einzelne jobs sollte es reichen im cronscript stderr&stdout nach /dev/null zu schicken.
Back to top
View user's profile Send private message
skibbi
Apprentice
Apprentice


Joined: 13 Apr 2004
Posts: 202
Location: Rostock - Germany

PostPosted: Thu Dec 16, 2004 12:54 pm    Post subject: Reply with quote

schmutzfinger wrote:
in /etc/crontab steht
Code:

MAILTO=root

wenn du das wegnimmst, dann stellst du alle mails ab. Für einzelne jobs sollte es reichen im cronscript stderr&stdout nach /dev/null zu schicken.

öhm ich hatte die cronjobs immer per Webmin angelegt. :/
Werd mal die MAN pages durchstöbern.
Back to top
View user's profile Send private message
skibbi
Apprentice
Apprentice


Joined: 13 Apr 2004
Posts: 202
Location: Rostock - Germany

PostPosted: Thu Dec 16, 2004 1:06 pm    Post subject: Reply with quote

Hab jetzt meinen crontab gefunden:

Code:

@reboot /sbin/sysctl -w dev.rtc.max-user-freq=1024


Und was muss ich hinzufügen um stderr und stdout nach /dev/null zu schicken?
Back to top
View user's profile Send private message
gentop
l33t
l33t


Joined: 29 Nov 2004
Posts: 639

PostPosted: Thu Dec 16, 2004 2:59 pm    Post subject: Reply with quote

An die entsprechende Zeile dessen Output du nich haben möchtest einfach
Code:

2>&1 >/dev/null

ranhängen ;)
Back to top
View user's profile Send private message
skibbi
Apprentice
Apprentice


Joined: 13 Apr 2004
Posts: 202
Location: Rostock - Germany

PostPosted: Thu Dec 16, 2004 4:40 pm    Post subject: Reply with quote

gentop wrote:
An die entsprechende Zeile dessen Output du nich haben möchtest einfach
Code:

2>&1 >/dev/null

ranhängen ;)

Ahh danke.

P.S. Ich glaub ich sollte mich mal näher mit der bash beschäftigen. :)
Back to top
View user's profile Send private message
DarKRaveR
Guru
Guru


Joined: 11 Oct 2003
Posts: 500
Location: Old Europe/G-Many

PostPosted: Thu Dec 16, 2004 5:07 pm    Post subject: Reply with quote

Im allgemeinen empfiehlt es sich nur STDOU umzuleiten, das heißt bei normalem Ablauf kein Output und keine E-Mail, bei fehlern allerdings bekommste noch mails :wink: .
Back to top
View user's profile Send private message
skibbi
Apprentice
Apprentice


Joined: 13 Apr 2004
Posts: 202
Location: Rostock - Germany

PostPosted: Thu Dec 16, 2004 5:16 pm    Post subject: Reply with quote

DarKRaveR wrote:
Im allgemeinen empfiehlt es sich nur STDOU umzuleiten, das heißt bei normalem Ablauf kein Output und keine E-Mail, bei fehlern allerdings bekommste noch mails :wink: .

Und das geht wie genau? Sorry in Sachen bash bin ich echt ne totale Niete. :(
Back to top
View user's profile Send private message
Deever
Veteran
Veteran


Joined: 06 Jul 2002
Posts: 1354
Location: Zürich / Switzerland

PostPosted: Thu Dec 16, 2004 5:36 pm    Post subject: Reply with quote

Ist nicht bash-spezifisch. Aber mach mal einen "Shellprogrammierung"-Kurs durch...dir fehlt sonst einiges!

HTH!
/dev
Back to top
View user's profile Send private message
gentop
l33t
l33t


Joined: 29 Nov 2004
Posts: 639

PostPosted: Thu Dec 16, 2004 5:39 pm    Post subject: Reply with quote

Na, dann nimmste halt nur

Code:

>/dev/null


hinter die Zeile ;)
Back to top
View user's profile Send private message
gentop
l33t
l33t


Joined: 29 Nov 2004
Posts: 639

PostPosted: Thu Dec 16, 2004 5:42 pm    Post subject: Reply with quote

Übrigens: Einen kompakten Shellprogrammierungskurs findest du hier ;)
Back to top
View user's profile Send private message
golloza
Guru
Guru


Joined: 14 Mar 2004
Posts: 427

PostPosted: Thu Dec 16, 2004 7:57 pm    Post subject: Reply with quote

skibbi wrote:
Hab jetzt meinen crontab gefunden:

Code:

@reboot /sbin/sysctl -w dev.rtc.max-user-freq=1024


Und was muss ich hinzufügen um stderr und stdout nach /dev/null zu schicken?


Dafür gibts übrigens /etc/sysctl.conf...
Back to top
View user's profile Send private message
skibbi
Apprentice
Apprentice


Joined: 13 Apr 2004
Posts: 202
Location: Rostock - Germany

PostPosted: Thu Dec 16, 2004 11:15 pm    Post subject: Reply with quote

Danke für die Tipps und den Link. :)

@golloza
Hatte schonmal "dev.rtc.max-user-freq=1024" in diese Datei geschrieben aber TV Time meckerte weiterhin rum.

Mfg skibbi
Back to top
View user's profile Send private message
schmutzfinger
Veteran
Veteran


Joined: 26 Oct 2003
Posts: 1287
Location: Dresden/Germany

PostPosted: Fri Dec 17, 2004 7:01 pm    Post subject: Reply with quote

@skibbi
Code:

echo 1024 > /proc/sys/dev/rtc/max-user-freq

in die datei /etc/conf.d/local.start einfügen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum