Setting the computer clock according to a time server on the internet
Is there a way to automatically set your computer clock according to a timeserver on the internet (eg. time.nist.gov) once a week?
|
The easy solution is to use rdate with the -s option (I run this from cron once a day or so on a server and it works well). If you need something a bit more advanced and reliable than that, you can set up NTP (Network Time Protocol), but I've found it to be something of a pain to get going (could be just me, though).
|
I managed to get NTP running (with YAST, SuSE 9.1). But how do I get it to syncronize the time every so often???
|
Use cron.
An entry in /etc/crontab such as: Code:
15 20 * * 7 "ntpdate serverName" see "man cron" for details --Ian |
There is also chrony.
|
It's also possible to configure cron to synchronize every time I connect to the net????
|
Why would you use cron for that (no regular intervals)?
Just write a script to 1st synchronize and 2nd start your preferred browser... |
Because I don't use my PC at fixed times but the first thing I do everytime I use it is to connect to the web.
|
I got it running now.
Thanx everybody |
@spariggio82
Funny answer. That's what I wrote, isn't it, no regular time... :) If you just want it right at the beginning of each session put it at the end of your boot up script... |
Dank JZ.
Sorry for the funny answer. I didn't read very well your post. See you |
You are wellcome. See you too (ahh, to be in Italy, and on its islands ... http://www.ct.ingv.it/UfMoni/ ... when the wheather is fine). :)
|
All times are GMT -5. The time now is 08:15 AM. |