Quantcast
Viewing all articles
Browse latest Browse all 5820

Beginners • Re: LED works when running from IDE, but not cronjob

  1. Why are you importing time if you're not using it?
  2. We don't know if your code is, in fact, running. It looks simple enough but you never know...
    Try changing your crontab entry to the following, let it run, then check the log file for errors.

    Code:

    */1 * * * * python3 /home/pi/redon.py 2>>/home/pi/redon.log
I imported time because I was going to have the LED do a few on/off states before blinking rapidly. The issue was resolved after 'rpdom' suggested that the code was complete and releasing the GPIO. I added a sleep then a blink and all is good now.

Statistics: Posted by duckredbeard — Tue Nov 12, 2024 5:01 am



Viewing all articles
Browse latest Browse all 5820

Trending Articles