Re: cronjobs
Ich poste mal einfach die Tatsachen:
ASTA-SERVER:/etc/cron.daily# ll
insgesamt 44
-rwxr-xr-x 1 root root 502 2002-07-04 23:13 bsdmainutils
-rwxr-xr-x 1 root root 669 2003-09-05 15:52 exim
-rwxr-xr-x 1 root root 419 2004-11-21 11:10 find
-rwxr-xr-x 1 root root 89 2004-06-11 15:05 logrotate
-rwxr-xr-x 1 root root 946 2004-07-22 20:27 man-db
-rwxr-xr-x 1 root root 86 2001-09-27 15:42 modutils
-rwxr-xr-x 1 root root 495 2001-11-18 23:29 netkit-inetd
-rwxr-xr-x 1 root root 2571 2004-07-28 22:44 standard
-rwxr-xr-x 1 root root 1307 2004-11-07 13:13 sysklogd
-rwxr-xr-x 1 root root 178 2005-01-16 15:52 zupdate_catalog.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Mein Script~~~~~~~~~~~
more crontab:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root run-parts --report /etc/cron.hourly
25 4 * * * root test -x /usr/sbin/anacron || run-parts --report
/etc/cron.daily
47 4 * * 7 root test -x /usr/sbin/anacron || run-parts --report
/etc/cron.weekly
52 4 1 * * root test -x /usr/sbin/anacron || run-parts --report
/etc/cron.monthly
Meiner meinung nach sollte das Script zupdate_catalog.sh um 4 Uhr 25
Minuten Täglich gestartet werden, was nicht geschieht.
Richard Mittendorfer wrote:
> Am Tue, 18 Jan 2005 00:40:39 -1000 sprach Vlad Vorobiev
> <listen@gogaru.net>:
>
>
>> Hallo bis jetzt habe ich immer ins crontab -e die Cronjobs
>> eingetragen. Bequemer ist es aber die Scripte die auszuführen sind ins
>>
>> /etc/cron.daily bzw. cron.hourly reinzuschreiben.
>
>
>
> dron.hourly hab ich hier nicht. ein entsprechender eintrag muss in der
> /etc/crontab sein.
>
>> Wenn ich alles richtig verstanden habe, werden diese Scripte
automatisch, ohne weiteres eintragen ausgeführt.
>> Bei mir tut sich nichts. Meine Scripte in diesen verzeichnissen werden
>>
>> nicht ausgeführt. Könnte jemand sagen wo es klemmen könnte?
>
>
>
> die aktualisierung der in /etc/crontab und /etc/cron.d/ neu
> eingetragenen scripts/befehle findet sofort (jede min) statt. die
> scripts in /etc/cron.[daily,monthly,..] werden laut den zeiten in
> /etc/crontab ausgeführt.
> die voraussetzung ist, dass sie valid bzw. ausführbar sind:
>
> /etc/cron.d/plattenplatz
> -----snip-----
> # disk usage reports.
> 55 */6 * * * root test -x /sbin/plattenplatz.sh && /usr/bin/nice \
> /sbin/plattenplatz.sh &> /dev/null
> -----snip-----
> ..ist im standard crontab format und ruft alle 6 stunden zur 55ten
> minute das script /sbin/plattenplatz.sh auf.
Das ist mir klar. Hier verweisst du direkt auf das Script-
> anders sieht das in zb. /etc/cron.daily/ aus:
>
> /etc/cron.daily/account_blue
> -----snip-----
> #!/bin/sh -e
> #
> prog=/usr/bin/fetchmailnow.sh
> account=/etc/fetchy_blue.conf
>
> [ -x $prog ] || exit 0
> [ -f $account ] || exit 0
>
> $prog --configfile $account
> -----snip-----
>
> ..hier wird das in /etc/cron.daily liegende (ausführbare!) script via
> "run-parts" (zeit siehe /etc/crontab) direkt aufgerufen.
Genau das funktioniert nicht. Siehe oben.
>
>> Ich benutze DEBIAN-SARGE. Muss man vieleicht etwas aktivieren?
>
>
>
> /usr/sbin/cron muss laufen ($ ps aux).
ps -aux|grep cron
root 24466 0.0 0.0 1756 584 ? Ss Jan17 0:00
/usr/sbin/cron
Danke
Vlad
Reply to:
- References:
- cronjobs
- From: Vlad Vorobiev <listen@gogaru.net>
- Re: cronjobs
- From: Richard Mittendorfer <jkerdawn@yahoo.com>