Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-26-2004, 11:52 AM
|
#1
|
Member
Registered: Dec 2000
Location: Toronto, Canaduhhhh
Distribution: Slackware -current, OpenBSD 3.8-stable
Posts: 178
Rep:
|
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?
|
|
|
02-26-2004, 12:16 PM
|
#2
|
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Rep:
|
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.
|
|
|
02-26-2004, 02:59 PM
|
#3
|
Senior Member
Registered: Sep 2003
Location: Indiana
Distribution: Slackware 15.0
Posts: 1,272
Rep:
|
|
|
|
02-26-2004, 06:04 PM
|
#4
|
Member
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607
Rep:
|
Are rdate and / or ntp on the Slack CDs or do you have to go and find them from somewhere else?
|
|
|
02-26-2004, 06:15 PM
|
#5
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
02-26-2004, 09:40 PM
|
#6
|
Member
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607
Rep:
|
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.
|
|
|
02-27-2004, 03:31 AM
|
#7
|
Member
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770
Rep:
|
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
|
|
|
02-27-2004, 04:12 PM
|
#8
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
ntpdate ntp1.massey.ac.nz
is good for Kiwi's ;}
Cheers,
Tink
|
|
|
All times are GMT -5. The time now is 08:36 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|