Create a separate bash script with the ntpdate command, and call that from cron. For some reason, calling commands directly from cron doesn't work.
Originally Posted by michael.doepper
Hello everyone!
I try to syncronize the system-time by using cron an ntpdate.
The concerning line in crontab is 1 * * * * ntpdate -s ip-address of time server
and by using the option -s the logging output is diverted to /var/log/syslog. In the next line
you see such a logging:
Aug 1 09:01:01 solarlinux /USR/SBIN/CRON[29560]: (root) CMD (ntpdate -s ...)
But if I check the remainig offset by ntpdate -q ip-address of time server,
its value doesn't become smaller, it seems as if ntpdate executed by cron does not
syncronize the time. Only if I execute the command manually in a shell, the offset
becomes notable smaller.
Does anybody have an idea how to solve this problem?
Thanks in advance!
Michael Doepper
Create a separate bash script with the ntpdate command, and call that from cron. For some reason, calling commands directly from cron doesn't work.
Originally Posted by michael.doepper
Thanks to Dave Bechtel for the response. But even if a seperate bash script was used, I had no success.
I found out, that the command in cron has to contain the full path of the command, instead of ntpdate
/usr/sbin/ntpdate has to be run.
Best regards
Michael Dopper

Vintage Digital VR241-A color CRT monitor, powers on, DEC Rainbow or terminal
$150.00
Vintage DEC Digital XMI-A1 5017293-01A1 LWPR BE3-0 VAX Circuit Board T2012
$74.99
Vintage DEC Digital T1043 DWMBB/B VAXBI XMI Adapter 5018232-01 C1 VAX Board
$119.99
Vintage DEC/Mostek memory systems MK 8015 AA-00 6805-08015 1100 REV C(B7)
$279.99
Vintage DEC E2052-AA AlphaServer I/O Board 9 Gold Ceramic ICs 4.3 LB Gold Scrap
$749.99
Vintage DEC Digital Equipment Flip-Chip Module Lot Parts
$59.99
Vintage DEC VT100 Series Terminal (Powers On)
$499.99
Vintage DEC Digital Equipment DELNI 8-Port Ethernet Local Network Hub VAXstation
$79.95
Vintage DEC Digital Starion 200 Desktop PC Powers On Boots To BIOS NO HDD - DW
$269.99
Vintage DEC Digital VSXXX-AA.B03 Hawley 3-Button Mouse 1986 Tested Working
$111.00