Hallo,
vielleicht suche ich an den falschen Stellen, doch ich habe nun x Stunden verbracht und verstehe nicht warum mein Cron job nicht läuft.
Hier der Auszug meines Cron
Code
# /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
# m h dom mon dow user command
0 */3 * * * root ntpdate -s 192.168.2.1
* 3 * * * root ntpdate -s 192.168.2.1
@reboot root ntpdate -s 192.168.2.1
#
Alles anzeigen
Die Statusabfrage ergibt folgendes:
Code
pi@raspberrypi ~ $ sudo service cron status -l
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled)
Active: active (running) since Tue 2015-10-20 13:42:04 CEST; 33s ago
Docs: man:cron(8)
Main PID: 485 (cron)
CGroup: /system.slice/cron.service
└─485 /usr/sbin/cron -f
Oct 20 13:42:04 raspberrypi systemd[1]: Started Regular background program processing daemon.
Oct 20 13:42:04 raspberrypi cron[485]: (CRON) INFO (pidfile fd = 3)
Oct 20 13:42:04 raspberrypi cron[485]: (CRON) INFO (Running @reboot jobs)
Oct 20 13:42:04 raspberrypi CRON[514]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct 20 13:42:04 raspberrypi CRON[561]: (root) CMD (ntpdate -s 192.168.2.1 )
Oct 20 13:42:04 raspberrypi CRON[514]: pam_unix(cron:session): session closed for user root
Alles anzeigen
Die Uhrzeit wird nicht syncronisiert. Wenn ich den Befehl manuell abgebe, dann wird die Zeit syncronisiert. Doch bei einem Neustart nicht.
Hoffentlich komme ich hier auf Lösung. Vielen Dank
Hoffi