LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-04-2004, 03:21 PM   #1
didi86
Member
 
Registered: Jun 2004
Distribution: OpenSuSE, CentOS, Linux From Scratch
Posts: 40

Rep: Reputation: 15
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?
 
Old 10-04-2004, 03:33 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,059

Rep: Reputation: 295Reputation: 295Reputation: 295
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).
 
Old 10-04-2004, 03:56 PM   #3
didi86
Member
 
Registered: Jun 2004
Distribution: OpenSuSE, CentOS, Linux From Scratch
Posts: 40

Original Poster
Rep: Reputation: 15
I managed to get NTP running (with YAST, SuSE 9.1). But how do I get it to syncronize the time every so often???
 
Old 10-04-2004, 09:48 PM   #4
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
Use cron.
An entry in /etc/crontab such as:
Code:
15 20 * * 7 "ntpdate serverName"
will run ntpdate to synchronise with the server at 8:15pm once a week on a sunday.

see "man cron" for details

--Ian
 
Old 10-05-2004, 04:55 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,642

Rep: Reputation: Disabled
There is also chrony.
 
Old 10-05-2004, 05:45 AM   #6
spariggio82
Member
 
Registered: Apr 2004
Location: Camporotondo Etneo, Sicily
Distribution: SuSE 8.2 SuSE 9.1 Fedora C1 Slackware 10.1 Knoppix 3.9
Posts: 174

Rep: Reputation: 30
It's also possible to configure cron to synchronize every time I connect to the net????
 
Old 10-05-2004, 05:58 AM   #7
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,642

Rep: Reputation: Disabled
Why would you use cron for that (no regular intervals)?

Just write a script to 1st synchronize and 2nd start your preferred browser...
 
Old 10-05-2004, 06:15 AM   #8
spariggio82
Member
 
Registered: Apr 2004
Location: Camporotondo Etneo, Sicily
Distribution: SuSE 8.2 SuSE 9.1 Fedora C1 Slackware 10.1 Knoppix 3.9
Posts: 174

Rep: Reputation: 30
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.
 
Old 10-05-2004, 06:22 AM   #9
didi86
Member
 
Registered: Jun 2004
Distribution: OpenSuSE, CentOS, Linux From Scratch
Posts: 40

Original Poster
Rep: Reputation: 15
I got it running now.
Thanx everybody
 
Old 10-05-2004, 06:24 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,642

Rep: Reputation: Disabled
@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...

Last edited by JZL240I-U; 10-05-2004 at 06:26 AM.
 
Old 10-05-2004, 08:44 AM   #11
spariggio82
Member
 
Registered: Apr 2004
Location: Camporotondo Etneo, Sicily
Distribution: SuSE 8.2 SuSE 9.1 Fedora C1 Slackware 10.1 Knoppix 3.9
Posts: 174

Rep: Reputation: 30
Dank JZ.

Sorry for the funny answer. I didn't read very well your post.

See you
 
Old 10-05-2004, 08:52 AM   #12
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,642

Rep: Reputation: Disabled
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).

Last edited by JZL240I-U; 10-05-2004 at 09:32 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Various clock issues: Clock shows wrong time only in Knoppmyth, & CMOS time change ? davidbix General 1 04-05-2006 09:58 PM
Time server needed to sync clock, CDT harisund Linux - General 2 10-05-2005 10:56 AM
Setting the system clock to a time server? orange400 Linux - General 4 06-13-2005 01:59 PM
computer clock lose time tcma Linux - Hardware 1 11-18-2004 04:25 PM
Searching for clock-synchro to world time server Schmurff Linux - Software 1 03-09-2004 10:26 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration