Yet another DST change problem

35 views
Skip to first unread message

Jim Easterbrook

unread,
Mar 26, 2023, 1:43:28 PM3/26/23
to py...@googlegroups.com
Grrr! I hate changing the clocks twice a year!

Last night my pywws went off air and wouldn't restart. Proper
investigation this morning found it was hanging in an infinite loop
trying to increment the "croniter" instance that is used for "cron"
sections in weather.ini It appears the croniter package has a bug with
incrementing past DST changes. (It breaks the cardinal rule of doing all
time comparisons in UTC, presumably because people expect 'cron' to use
local time.)

I haven't tried much to fix this in pywws. The solution, if this happens
to you, is to edit status.ini and advance the cron entries in [last
update] to past the witching hour when the clocks change.

--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

pco...@suremail.gg

unread,
Mar 28, 2023, 7:07:40 AM3/28/23
to pywws
Hi Jim,

Oddly, I don't appear to have this problem, but my son does. My build was a clone of his, except that I opted not to upload data to the various weather sites, such as Wunderground etc.
This makes me wonder if that may be part of the problem?
That is the only difference between our setup.

Regards
Phil Cooper

Jim Easterbrook

unread,
Mar 28, 2023, 7:16:42 AM3/28/23
to py...@googlegroups.com
On 28/03/2023 12:07, 'pco...@suremail.gg' via pywws wrote:
>
> Oddly, I don't appear to have this problem, but my son does. My build
> was a clone of his, except that I opted not to upload data to the
> various weather sites, such as Wunderground etc.
> This makes me wonder if that may be part of the problem?

The problem only affects 'cron' entries in weather.ini. If you're not
using cron for your periodic tasks then there isn't a problem.

I also suspect it might work if your station is running normally all
through the DST change. My pywws stopped (for unknown reasons, most
likely wifi failure) a few hours before the change and I tried to
restart some hours after.

I hadn't had this problem before and I think I've been using cron
sections for years.

pco...@suremail.gg

unread,
Mar 28, 2023, 10:47:25 AM3/28/23
to py...@googlegroups.com
Hi Jim,

Thanks for the reply.
I do indeed use cron entries, and here are a few of mine:

[cron prehourly]
format = 59 * * * *
text = []
plot = []
services = []

[cron hourly]
format = 0 * * * *
text = ['tweet.txt']
plot = []
services = [('twitter', 'tweet.txt')]

[cron morning]
format = 0 9 * * *
text = ['forecast_tweet.txt']
plot = []
services = [('twitter', 'forecast_tweet.txt')]

[cron evening]
format = 0 21 * * *
text = ['forecast_tweet.txt']
plot = []
services = [('twitter', 'forecast_tweet.txt')]

[cron midnight]
format = 0 0 * * *
text = ['Tweet_last_24hrs.txt']
plot = ['24hrs_full_features.png.xml']
services = [('twitter', 'Tweet_last_24hrs.txt')]

Even when I had my Pi connected via a poor WiFi connection, I never had this issue, although I now have a mesh system, and my Pi is now wired into one of the mesh units, mainly to overcome the occasional loss of connection.

Checking my sons Twitter feed, his stopped at 2300UTC, so maybe there is a clue there, indicating that it too may have lost the WiFi connection before the time change?

Regards

Phil Cooper

--
You received this message because you are subscribed to the Google Groups "pywws" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pywws+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/242668df-238e-6054-aef6-e87dc1e1e9e2%40jim-easterbrook.me.uk.


Jim Easterbrook

unread,
Mar 29, 2023, 6:18:43 AM3/29/23
to py...@googlegroups.com
On 28/03/2023 15:47, 'pco...@suremail.gg' via pywws wrote:
>
> Thanks for the reply.
> I do indeed use cron entries, and here are a few of mine:
>
> Even when I had my Pi connected via a poor WiFi connection, I never had this issue, although I now have a mesh system, and my Pi is now wired into one of the mesh units, mainly to overcome the occasional loss of connection.
>
> Checking my sons Twitter feed, his stopped at 2300UTC, so maybe there is a clue there, indicating that it too may have lost the WiFi connection before the time change?

I suspect you have different versions of croniter. I thought I had
updated mine, but I actually updated the Python 2 version, but my pywws
is running Python 3. Doh!

Meanwhile, I've managed to reproduce the problem and have committed a
fix to GitHub. I've got until the next DST change to issue a new release
of pywws.
Reply all
Reply to author
Forward
0 new messages