fixRTC for 7300 ?
Kevin O'Gorman
kevin at kosman.UUCP
Sat Apr 9 02:30:35 AEST 1988
In article <78 at ihtlt.UUCP> tlt at ihtlt.UUCP (T. L. Todd) writes:
>A while back someone posted a program to fix the inaccuracies of
>the clock in the UNIX-PC. This program called "fixRTC" was supposed
>to be run out of cron. If you need to set the clock backwards x
>number of seconds every so often it has a problem. The program
>runs and set the clock back all right but then cron wants to keep
>running it over and over again so that "time stands still". Is it
>now in the twilight zone? Did anyone else try this program and
>experience this problem? Anyone have a fix for this?
>
>Terry Todd @ ihlpl!tlt or 312-979-2077
Yes, I had the problem. Here's how I dealt with it:
The problem occurs because you're backing up the clock to before the time that
cron has been told to start fixRTC, which it obligingly does, right? So, by
having cron run something that delays FIRST, for more than 23 seconds, you get
by. You delay 60 seconds, run fixRTC, and now the time is *after* the moment
that cron would run fixRTC. In another 30 seconds or so, cron's sleep(60) will
expire, and seeing that time has gone by, be very happy.
You can do this right in the crontab line:
3 0 * * 1 /bin/su root -c "/bin/sleep 60; /usr/local/bin/fixRTC -23 "
More information about the Unix-pc.general
mailing list