Moin Liste, wie gewöhne ich cron ab, daß er mir die Ergebnisse der Aufrufe zumailt? In man 5 crontab steht: Command output is mailed to the crontab owner (BSD can't do this), can be mailed to a person other than the crontab owner (SysV can't do this), or the feature can be turned off and no mail will be sent at all (SysV can't do this either). OK, sieht für mich wie ein GNU-cron-Feature aus. Aber wie mache ich das jetzt? Olli --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
Oliver Antwerpen wrote:
Moin Liste, wie gewöhne ich cron ab, daß er mir die Ergebnisse der Aufrufe zumailt? In man 5 crontab steht:
Command output is mailed to the crontab owner (BSD can't do this), can be mailed to a person other than the crontab owner (SysV can't do this), or the feature can be turned off and no mail will be sent at all (SysV can't do this either).
<cite> 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. </cite> Gruß, daniel --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
On Mon, Nov 06, 2000 at 14:35 +0100, Oliver Antwerpen wrote:
Moin Liste, wie gewöhne ich cron ab, daß er mir die Ergebnisse der Aufrufe zumailt? In man 5 crontab steht:
Command output is mailed to the crontab owner (BSD can't do this), can be mailed to a person other than the crontab owner (SysV can't do this), or the feature can be turned off and no mail will be sent at all (SysV can't do this either).
OK, sieht für mich wie ein GNU-cron-Feature aus. Aber wie mache ich das jetzt?
In der /etc/crontab reicht ein - vor der Zeile aus. Sollte aber auch in man 5 crontab irgendwo stehen... -- Marco Dieckhoff icq# 22243433 PGP key 9EFA D64F 5DAA D36B E0E7 CE1B 9E1B 4903 0C51 1632 --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
Marco Dieckhoff wrote:
In der /etc/crontab reicht ein - vor der Zeile aus. Sollte aber auch in man 5 crontab irgendwo stehen...
hmm, nich' ganz oder ? <cite> If the uid of the owner is 0, he can put a "-" as first character of a crontab entry. Then cron won't write a sys log message about this command. </cite> daniel -- --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
On Mon, Nov 06, 2000 at 14:31 +0100, Daniel Wolpert wrote:
Marco Dieckhoff wrote:
In der /etc/crontab reicht ein - vor der Zeile aus. Sollte aber auch in man 5 crontab irgendwo stehen...
hmm, nich' ganz oder ? <cite> If the uid of the owner is 0, he can put a "-" as first character of a crontab entry. Then cron won't write a sys log message about this command. </cite>
Wem gehört /etc/crontab denn bei dir??? Bei mir ist /etc/crontab immer noch ein Cron-File von root. Egal, unter welcher UID das Programm nachher läuft... -- Marco Dieckhoff icq# 22243433 PGP key 9EFA D64F 5DAA D36B E0E7 CE1B 9E1B 4903 0C51 1632 --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
Marco Dieckhoff wrote:
On Mon, Nov 06, 2000 at 14:31 +0100, Daniel Wolpert wrote:
Marco Dieckhoff wrote:
In der /etc/crontab reicht ein - vor der Zeile aus. Sollte aber auch in man 5 crontab irgendwo stehen...
hmm, nich' ganz oder ? <cite> If the uid of the owner is 0, he can put a "-" as first character of a crontab entry. Then cron won't write a sys log message about this command. </cite>
Wem gehört /etc/crontab denn bei dir???
Bei mir ist /etc/crontab immer noch ein Cron-File von root.
Egal, unter welcher UID das Programm nachher läuft... ??? hm, ich denke Du machst hier einen Denkfehler. Cron läuft doch immer unter UID 0, oder?!
Bezieht sich dies nicht eher darauf, welchem Benutzer/welcher UID die jeweilige Crontab zugeordnet ist?! Kann nicht jeder Benutzer eine 'crontab' haben (sofern er nicht durch einen Eintrag in der /var/cron/deny daran gehindert wird) ?! Wenn dem noch immer so sein sollte, hat das Ganze schon seinen Sinn. Gruß, daniel --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
On Mon, Nov 06, 2000 at 15:19 +0100, Daniel Wolpert wrote:
Marco Dieckhoff wrote:
On Mon, Nov 06, 2000 at 14:31 +0100, Daniel Wolpert wrote:
Marco Dieckhoff wrote:
In der /etc/crontab reicht ein - vor der Zeile aus. Sollte aber auch in man 5 crontab irgendwo stehen...
hmm, nich' ganz oder ? <cite> If the uid of the owner is 0, he can put a "-" as first character of a crontab entry. Then cron won't write a sys log message about this command. </cite>
Wem gehört /etc/crontab denn bei dir???
Bei mir ist /etc/crontab immer noch ein Cron-File von root.
Egal, unter welcher UID das Programm nachher läuft...
??? hm, ich denke Du machst hier einen Denkfehler. Cron läuft doch immer unter UID 0, oder?!
ACK.
Bezieht sich dies nicht eher darauf, welchem Benutzer/welcher UID die jeweilige Crontab zugeordnet ist?!
ACK. Aber gefragt war ursprünglich danach, wie man die Benachrichtigungen aus der /etc/crontab ausschalten kann. Und die gehört root. Root hat aber die Möglichkeit, in seiner/ihrer /etc/crontab festzulegen, unter welcher UID die Programme ausgeführt werden. Das ist aber nicht entscheidend dafür, ob's ne Mail gibt oder nicht. Dafür ist alleine der/das "-" vor der Zeile zuständig. (Oder ein (nicht) gesetztes MAILTO)
Kann nicht jeder Benutzer eine 'crontab' haben (sofern er nicht durch einen Eintrag in der /var/cron/deny daran gehindert wird) ?! Wenn dem noch immer so sein sollte, hat das Ganze schon seinen Sinn.
Natürlich kann das jeder. Aber da laufen alle Programme dann unter der UID des Benutzers. Nicht als UID 0. -- Marco Dieckhoff icq# 22243433 PGP key 9EFA D64F 5DAA D36B E0E7 CE1B 9E1B 4903 0C51 1632 --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
ACK. Aber gefragt war ursprünglich danach, wie man die Benachrichtigungen aus der /etc/crontab ausschalten kann. Und die gehört root.
Nö, oder ich habe die ursrüngliche Mail nicht richtig gelesen?! Gruß, daniel --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
On Mon, Nov 06, 2000 at 15:35 +0100, Daniel Wolpert wrote:
ACK. Aber gefragt war ursprünglich danach, wie man die Benachrichtigungen aus der /etc/crontab ausschalten kann. Und die gehört root.
Nö, oder ich habe die ursrüngliche Mail nicht richtig gelesen?!
Asche auf mein Haupt. Sorry, da hab ich mich vertan. Also: Alles, was ich sagte gilt eigentlich nur für die /etc/crontab -- Marco Dieckhoff icq# 22243433 PGP key 9EFA D64F 5DAA D36B E0E7 CE1B 9E1B 4903 0C51 1632 --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
Hallo Oliver, * Am 06.11.2000 um 14:35 Uhr schrieb Oliver Antwerpen:
wie gewöhne ich cron ab, daß er mir die Ergebnisse der Aufrufe zumailt? In man 5 crontab steht:
nebem dem '-' (wobei sich die Gelehrten noch drüber streiten;) kannst Du auch einfach eine Umleitung von STDIN und STERR nach /dev/null eintragen. Cron schickt Dir alles zu, was für gewöhnlich auf der Konsole, bzw. im xterm erscheint. 0 21 * * * root test -x .../prg && .../prg &>/dev/null ^^^^^^^^^^^ sollte für gewöhnlich ausreichen. MfG. Jürgen -- Die Ergebnisse eines Programms sollten immer reproduzierbar sein. Sie sollten alle auf die gleiche Art danebengehen. / Registered Linux-User #130804 http://counter.li.org \ \ Linux Stammtisch Bremerhaven http://linux.hs-bremerhaven.de / --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
Hallo,
Von: Juergen Schwarting [mailto:Juergen_Schwarting@gmx.de]
Hallo Oliver,
* Am 06.11.2000 um 14:35 Uhr schrieb Oliver Antwerpen:
wie gewöhne ich cron ab, daß er mir die Ergebnisse der Aufrufe zumailt? In man 5 crontab steht:
nebem dem '-' (wobei sich die Gelehrten noch drüber streiten;) kannst Du auch einfach eine Umleitung von STDIN und STERR nach /dev/null eintragen. Cron schickt Dir alles zu, was für gewöhnlich auf der Konsole, bzw. im xterm erscheint.
0 21 * * * root test -x .../prg && .../prg &>/dev/null ^^^^^^^^^^^ sollte für gewöhnlich ausreichen.
Stimmt, auf die einfachsten Sachen bin ich nicht gekommen... Aber da die crontabs in /var/spool/cron jeweils den Namen des Besitzers haben, aber root gehören, hat es auch ein - vor dem Eintrag getan... Danke für die Tips! Olli --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
participants (4)
-
antwerpen@netsquare.org
-
dw@siebel.de
-
Juergen_Schwarting@gmx.de
-
linux@jwr.de