Hallo, Hab ewig viel gelesen, aber irgendwie klappt nicht was ich will. Anacron soll ja beim 1. Einschalten des PC ein Script abarbeiten. Wie im Wiki steht:"Anstatt einer Crontab muss nur das auszuführende Skript oder Programm in das entsprechende Verzeichnis des Anacron-Dienstes kopiert oder verlinkt werden." Entsprechend habe ich nun testweise ausführbare Scripts in /etc/cron.daily; /opt/scripts; /usr/local/sbin kopeirt in der Hoffnung, dass wenigstens einer davon gemacht wird. Nichts! Anacron stellt lediglich den timestamp um.
Anbei meine Files in der Hoffnung, dass der Fehler gefunden wird.
1 2 3 4 5 6 | #Das ist die ausführbare Datei xyz # Um zu testen, ist die in: /usr/local/sbin ; /etc/cron.daily ; /opt/scripts #!/bin/bash #MAILTO: m@localhost cp /home/m/Bilder/eiffel.gif /home/m/Schreibtisch # |
1 2 3 4 | # Das ist meine crontab -e 40 6 * * * /etc/cron.daily 45 11 * * 0-6 /usr/local/sbin/backup.sh |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Das ist meine /etc/anacrontab # /etc/anacrontab: configuration file for anacron # See anacron(8) and anacrontab(5) for details. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/scripts MAILTO="m@localhost" #RANDOM_DELAY=45 # the jobs will be started during the following hours only START_HOURS_RANGE=3-22 # These replace cron's entries # Periode Verzögerung Job-Identifikation Kommando 1 5 cron.daily nice run-parts --report /etc/cron.daily 7 10 cron.weekly nice run-parts --report /etc/cron.weekly @monthly 25 cron.monthly nice run-parts --report /etc/cron.monthly # |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Das ist meine /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 # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/scripts # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # /var/log/syslog Feb 19 09:55:32 LINUX-BLACK cron[1330]: (CRON) INFO (pidfile fd = 3) Feb 19 09:55:32 LINUX-BLACK anacron[1362]: Anacron 2.3 started on 2015-02-19 Feb 19 09:55:32 LINUX-BLACK cron[1365]: (CRON) STARTUP (fork ok) Feb 19 09:55:32 LINUX-BLACK anacron[1362]: Will run job `cron.daily' in 5 min. Feb 19 09:55:32 LINUX-BLACK anacron[1362]: Jobs will be executed sequentially Feb 19 09:55:32 LINUX-BLACK cron[1365]: (CRON) INFO (Running @reboot jobs) Feb 19 10:00:32 LINUX-BLACK anacron[1362]: Job `cron.daily' started Feb 19 10:00:32 LINUX-BLACK anacron[2758]: Updated timestamp for job `cron.daily' to 2015-02-19 Feb 19 10:02:56 LINUX-BLACK AptDaemon: INFO: Quitting due to inactivity Feb 19 10:02:56 LINUX-BLACK AptDaemon: INFO: Quitting was requested Feb 19 10:17:02 LINUX-BLACK CRON[3013]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Feb 19 10:19:53 LINUX-BLACK anacron[1362]: Job `cron.daily' terminated (exit status: 1) (mailing output) Feb 19 10:19:53 LINUX-BLACK anacron[1362]: Normal exit (1 job run) |
1 2 | # "mail" gibt folgendes aus: N 10 Anacron Do Feb 19 10:19 17/703 Anacron job 'cron.daily' |
Für Hinweise vielen Dank.
Miranda