What's the easiest way to make Busybox keep correct time?

K.S. skyscanner at gmx.ca
Sun Aug 31 19:04:52 UTC 2014


As I mentioned in a previous message, I am in the process of setting up a a
small backend receiver box for free-to-air satellite television that
includes Busybox.  It has the ability to record programs on a schedule, and
for some unknown reason it appears the designers forgot to implement a way
to keep the time set correctly.  Right now it appears to be losing about one
second per hour, give or take a little, which means that after a couple of
days it's a full minute off, which is really bad when you are trying to
accurately schedule recordings.

I read in one of these threads that I can correct the time by entering this
at the command prompt:

ntpd -q -p pool.ntp.org

And that does work, but it only sets the time once, and does not keep the
time accurate over any long period (is that because of the -q option?)

Anyway, what I really want to know is, what's the easiest way to make this
device keep accurate time?  I assume that I need something that will run in
the background and periodically query the time server and adjust the time,
and also some way to make sure that gets started after every reboot.  This
seems like this should be very easy, but I'll ask you experts, what would be
the easiest or best way?

I will note that it does not appear as if crontab is fully implemented,
because if I try to run crontab with the -l or -e option it displays,
"crontab: can't change directory to '/var/spool/cron/crontabs': No such file
or directory".  So if there is a way to do this that doesn't involve using
crontab, that might be better, although reliability is my #1 concern.



More information about the busybox mailing list