Alexander Thoma
Am Fre, 2002-04-12 um 09.14 schrieb Thomas:
Hallo Liste,
Ich moechte einen CRON Job erstellen. Dazu schreibe ich in /etc/crontab 5 12 * * * root /etc/init.d/xy
Somit sollte das Script xy jeden Tag um 5 nach 12 gestartet werden. Leider funktioniert das nicht. Das Script selber laeuft aber wenn ich in der bash /etc/init.d/xy eingebe und bestaetige. Muss ich nachdem ich die crontab geaendert habe noch etwas machen? (SuSEconfig oder so was aehnliches)
Bin fuer jeden Hinweis dankbar.
du musst den cron neu starten.
/etc/init.d/cron {stop,start}
Na - das halte ich noch für ein Gerücht. Wenn, dann würde ein kill -1 <crond-pid> schon ausreichen, damit der cron-demon die Config neu lädt. Aber dies ist laut man-page auch nicht notwendig (Wie mich vor einiger Zeit Bernd darauf aufmerksam gemacht hat!) http://linux.ctyme.com/man/man0305.htm "Additionally, cron checks each minute to see if its spool directory's modtime (or the modtime on /etc/crontab) has changed, and if it has, cron will then examine the modtime on all crontabs and reload those which have changed. Thus cron need not be restarted whenever a crontab file is modified. Note that the Crontab (1) command updates the modtime of the spool directory whenever it changes a crontab." ==> "Thus cron need not be restarted whenever a crontab file is modified." Mit den besten Grüßen, Konrad Neitzel -- SoftMediaTec GmbH Tel: 0172 / 689 31 45 Fax: 069 / 90 50 99 53