Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8051

General discussion • Re: MQTT Publishing Cron Job Stopping Randomly

$
0
0
This starts the script at reboot and works fairly well, HOWEVER, it seems to stop at some point in the night. Rebooting the Pi restarts the script and everything works again. Any idea why that happens? The script should run indefinitely as the primary code block is in a while True block
:

With my MQTT I find I need to put in try/except to ensure connection/publication.

What I suggest you do is trap to see what the error is causing the problem.

Statistics: Posted by DS256 — Wed May 07, 2025 8:35 pm



Viewing all articles
Browse latest Browse all 8051

Trending Articles