LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   sntp with cron daemon doesn't work (https://www.linuxquestions.org/questions/linux-software-2/sntp-with-cron-daemon-doesnt-work-4175520740/)

roll.84 10-01-2014 08:04 AM

sntp with cron daemon doesn't work
 
Hi,

I am using SuSE 12.2 system. I set sntp -s date command in crond as following

Quote:

echo "* * * * * sntp -s 192.168.128.11 " > /home/temp/cron.temp
crontab /home/temp/cron.temp
and then checking this issue

crontab -l

* * * * * sntp -s 192.168.128.11

it is looks Ok.


However, the time is not updated when i change set a garbage date

There is system messages log here it is invoked every minutes

/var/log/messages

Quote:

Oct 1 09:48:01 x2 /USR/SBIN/CRON[14583]: (root) CMD (sntp -s 192.168.128.11 )
Oct 1 09:49:01 x2 /USR/SBIN/CRON[15265]: (root) CMD (sntp -s 192.168.128.11 )
Oct 1 09:50:01 x2 /USR/SBIN/CRON[15944]: (root) CMD (sntp -s 192.168.128.11 )
Oct 1 09:51:01 x2 /USR/SBIN/CRON[16625]: (root) CMD (sntp -s 192.168.128.11 )
Oct 1 09:52:01 x2 /USR/SBIN/CRON[17315]: (root) CMD (sntp -s 192.168.128.11 )


Ontheotherhand date is updated when i call the command (sntp -s 192.168.128.11) manually

TenTenths 10-01-2014 09:40 AM

In your cron job specify
Code:

/the/full/path/to/sntp


All times are GMT -5. The time now is 09:33 PM.