bk1285 / rpi_wordclock

Software to create a Raspberry Pi based wordclock
GNU General Public License v3.0
214 stars 106 forks source link

wordclock does not run on startup via crontab #172

Closed kas1kas closed 3 years ago

kas1kas commented 3 years ago

wordclock does not start automatically after changing crontab:

sudo crontab -e @reboot sudo python /home/pi/rpi_wordclock/wordclock.py

Any tip? I have set console autologin as pi user no message, no error

FrankX0 commented 3 years ago

This could be useful: Debugging crontab jobs

kas1kas commented 3 years ago

I guess there is some bug in the wordclock software because it does work when I change

startup_message = ShowIP to text.

Below the error with the ShowIP keyword:

I don't really need the IP address to be shown on startup but if anyone wants to fix it:

Traceback (most recent call last): File "/home/pi/rpi_wordclock/wordclock.py", line 167, in word_clock.startup() File "/home/pi/rpi_wordclock/wordclock.py", line 104, in startup

FrankX0 commented 3 years ago

Thanks for reporting this. I expect that it fails because it does not have an ip address yet. This could be handled in the application, or a delayed start could be introduced in crontab. Or your solution of course.

bk1285 commented 3 years ago

Thanks for reporting, @kas1kas! The clock should definetly not crash, if no ip is provided.

bk1285 commented 3 years ago

Here we go, @kas1kas ;)