ich versuche im Moment mit cron bzw. mit der crontab zurechtzukommen.
Man liesst immer, dass man die /etc/crontab nicht verändern sollte.
Also mache ich ein 'crontab /etc/crontab' um eine Kopie anzulegen und diese
dann mit 'crontab -e' zu bearbeiten.
Problem 1:
-------------
Die Kopie liegt in /var/spool/cron/crontabs/root.
Leider wird diese überhaupt nicht ausgeführt. Ich bekomme ein Mail in der steht
Das heisst, die Kopie wird ausgelesen, aber gibt eine Fehlermeldung zurück./bin/sh: line 1: root command not found
Inhalt der Kopie:
Problem 2:# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.vOvhJP/crontab installed on Wed Jul 5 08:26:52 2006)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=enibas
# m h dom mon dow user command
*/1 * * * * root logger "eigene crontab"
-------------
Meine Orginal crontab wird zwar abgearbeitet, aber ich bekomme keine Mail.
Inhalt der Orginal crontab:
Beide Dateien sind bis auf die Meldung identisch. Es kommt aber trotzdem zu einem unterschiedlichen Verhalten.# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file.
# This file also has a username field, that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=enibas
# m h dom mon dow user command
#17 * * * * root run-parts --report /etc/cron.hourly
#25 6 * * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily
#47 6 * * 7 root test -x /usr/sbin/anacron || run-parts --report /etc/cron.weekly
#52 6 1 * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly
#
*/1 * * * * root logger "root hat geloggt in messagas"
Von der Orginal crontab bekomme ich keine Mail über den Vollzug und die Kopie wird gar nicht erst abgearbeitet.
Kann mir bitte jemand mal die Materie erklären wo das Problem liegt?
Danke Dirk