Reboot puzzle related to daylight savings time end

General support for the Pi-Star System
Post Reply
AE5E
Posts: 23
Joined: Sat Mar 07, 2020 11:05 pm

Reboot puzzle related to daylight savings time end

Post by AE5E »

For about 5 months I have been running Pi-Star 4.1.2 with System Cron:

30 2 * * 0 root /sbin/shutdown -r now #Reboot Sunday at 02:30 AM

As a result it has successfully rebooted every Sunday morning at 02:30 AM, except this past Sunday, when daylight savings time ended at 2 AM for the season. What appears to have happened was it shutdown, but did not restart. I had to manually power cycle it, which is inconvenient due to our restricted access to the commercial location where we are a guest.

I don't know cron well enough to know if this could be related to daylight savings time fall back or just an amazing coincidence.

I have changed the command to:

30 1 * * 0 root /sbin/shutdown -r now #Reboot Sunday at 01:30 AM

As such the reboot will run 30 minutes before the time change, in March and November. It might make a difference.
Ron, AE5E
AE5E
Posts: 23
Joined: Sat Mar 07, 2020 11:05 pm

Re: Reboot puzzle related to daylight savings time end

Post by AE5E »

I use ZeroTier to permit remote access to the STM32-MMDVM controller. ZeroTier reports the disconnection, and it was approximately at the daylight savings time change. I prefer to reboot automatically, and have been doing so for over 5 months without issue at 2:30 AM Sundays.

I have changed the system cron entry to:

30 1 * * 0 root /sbin/shutdown -r now # Reboot Sunday at 01:30 AM

As a result the reboot should occur 30 minutes before the twice a year time change. Will it make a difference? It will be a long time, March and November 2021, for the test.
Ron, AE5E
AE5E
Posts: 23
Joined: Sat Mar 07, 2020 11:05 pm

Re: Reboot puzzle related to daylight savings time end

Post by AE5E »

System Cron uses the system time setting you have chosen. You can select UTC should you wish. The crontab contains actions to occur at 03:25, 03:47 and 03:52 system time. If you chose UTC, and were in the Pacific Time Zone, these actions would actually occur at 19:25, 19:47 and 19:52 PST. That might be undesirable. I would suggest selecting a system time setting corresponding to your location.

With respect to using the system cron to reboot. I temporarily set my spare STM32-DVM running Pi-Star code to reboot hourly. I ran this 4 days, about 100 reboots without issue. I have currently set this line in the crontab:

1 0 * * 0 root /sbin/shutdown -r now # Reboot at 00:01 Sunday morning

This avoids any daylight savings time issue, even if imaginary, and results in a reboot once a week at an appropriate time.

The reboot takes 40 seconds.
Ron, AE5E
Post Reply