Cron configuration improvements for Raspberry Pi

One of the shortcomings or RPi for (m)any serious applications is that it lacks a hardware clock so when it starts, the clock is not set correctly.

This deficiency can be overcome to some extent for some applications with the fake-hwclock module and SNTP where the RPi is always connected to a network.

The standard scheduling daemon cron does not run tasks that were missed because the system was not running at the time they were scheduled. It is a significant shortcoming that has been overcome by adding another element, anacron, which wraps the cron tasks and is scheduled by cron and at startup. All of this is very dependent on correct clock time, and for RPi systems that lack a hardware clock (the out of the box hardware), the system time can be quite wrong at the time anacron is scheduled as part of the startup procedure.
Continue reading Cron configuration improvements for Raspberry Pi

Real time clock for Raspberry Pi

One of the shortcomings or RPi for (m)any serious applications is that it lacks a hardware clock so when it starts, the clock is not set correctly.

This deficiency can be overcome to some extent for some applications with the fake-hwclock module and SNTP, but this is not a solution if the RPi is not always connected to a network time reference.

One solution is a real time clock module such as the DS1307, or better still the DS3231. The latter has an internal crystal with 2ppm (5s/month) accuracy from 0-40° which is much better than typically achieved with a DS1307 (which is dependent on the external crystal). Continue reading Real time clock for Raspberry Pi