LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-26-2004, 10:52 AM   #1
jspaceman
Member
 
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178

Rep: Reputation: 30
Keeping my clock accurate with crontab


As root I typed crontab -e and typed in the following:

Quote:
#Run rdate every Wednesday at 4:30 to keep clock accurate:
30 4 * * 3 /usr/bin/rdate -s time.nrc.ca 1> /dev/null
Will this work? Or did I leave something off? I notice that some of the other entries in crontab -e are like this:

Quote:
# Run monthly cron jobs at 4:20 on the first day of the month:
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null
I notice there is an additional part in that entry that reads "/etc/cron.monthly". Do I need to add something like that to the entry I made?

I want rdate to update my system time every Wednesday at 4:30am, regardless of whether a user is logged in or not. Should I use root's crontab -e for that, or should I put an entry in /etc/cron.weekly in order to make this systemwide?
 
Old 02-26-2004, 11:16 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
I think that will work. But if you really want to keep your clock accurate perhaps you should look into running ntp. It'll allow you to connect to a few (I recommend 3 or 4) clock servers and it'll keep your clock inline all the time. It also makes changes gradually by dropping seconds here and there until it is correct to ensure you don't run into clock skew problems with anything.
 
Old 02-26-2004, 01:59 PM   #3
ringwraith
Senior Member
 
Registered: Sep 2003
Location: Indiana
Distribution: Slackware 15.0
Posts: 1,272

Rep: Reputation: 65
http://members.cox.net/laitcg/new/time.html

Some help in setting up
 
Old 02-26-2004, 05:04 PM   #4
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 32
Are rdate and / or ntp on the Slack CDs or do you have to go and find them from somewhere else?
 
Old 02-26-2004, 05:15 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
originally posted by Kovacs
Are rdate and / or ntp on the Slack CDs or do you have to go and find them from somewhere else?
/me shakes his head ... "have you tried to look on your CD mate?" :}

Yes, ntp is included. Or at least was in 8.1 :}


Cheers,
Tink

 
Old 02-26-2004, 08:40 PM   #6
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 32
I must be an idiot... I had looked for ntp before and not been able to find it, and now there it is staring at me in n/. Whoops.
 
Old 02-27-2004, 02:31 AM   #7
davidsrsb
Member
 
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770

Rep: Reputation: 33
The command looks like:
ntpdate ntp.timeserver.org
Find a suitable public secondary NTP server near you, don't try syncing to a primary server, these are not intended for individuals
 
Old 02-27-2004, 03:12 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
ntpdate ntp1.massey.ac.nz
is good for Kiwi's ;}


Cheers,
Tink
 
  


Reply



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
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 07:19 PM
How accurate is LM_Sensors Mojojo Linux - Software 0 12-23-2004 07:49 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
How do I keep accurate time? teeno Linux - Software 8 10-11-2003 07:04 PM
Clock not keeping time Culbert Linux - Software 3 03-15-2003 06:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration