PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : cron befehl



jochenjjj
29.11.04, 20:53
hallo zusammen
ich habe ein kleinen cron befehl der jeden tag um 8:07 dieses Script aufrufen soll.(das script liegt im homeverzeichnis)
Wo muss ich dieses cron befehl eintragen.in der crontab? ist dieser befehl denn soweit richtig?
mfg jochen


cron befehl
07 08 * * root /home/script

carnil
29.11.04, 21:07
Hi

Da fehlt imho noch ein Sternchen (*): siehe man 5 crontab unter EXAMPLE SYSTEM CRON FILE:


This has the username field, as used by /etc/crontab.
# /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

# m h dom mon dow user command
42 6 * * * root run-parts --report /etc/cron.daily
47 6 * * 7 root run-parts --report /etc/cron.weekly
52 6 1 * * root run-parts --report /etc/cron.monthly
#
# Removed invocation of anacron, as this is now handled by a
# /etc/cron.d file


hth,

MfG carnil

Kloppke
29.11.04, 21:21
Du solltest für deinen user eine eigene Crontab erstellen:
crontab -l
um zu sehn obs schon eine gibt

wenn nicht: crontab /etc/crontab/
erstellt eine Kopie der Standard SystemCrontab

Und dann crontab -e um deine crontab zu bearbeiten.

CEROG
30.11.04, 04:35
Hallo zusammen,

und noch ein Tipp:

Schau in deine Manpage für die Crontab.

Es scheinen mehrere verschiedene Cron-Daemons unter Linux verwendet zu werden und nicht jede kommt mit der Angabe des Users im jeweiligen Eintrag klar.

Viele Grüße,

CEROG