Page 1 of 1

wiringPi gpio command not working from crontab

Posted: Sun Apr 17, 2016 6:12 pm
by nxet
I have tested every single possible configuration, but still I can't get it to work. When I issue any "gpio command" from the console, everything works just fine. Set mode or Write both return the expected results.
But when the commands are issued via crontab (root's) @reboot, nothing works and I can't even set the pin mode.
I have a fresh install of Raspbian, installed git-core and then built from wiringPi folder. Dependencies seem met given the working commands from cli, but still I can't figure out where it's failing at boot.
A simple "@reboot gpio mode 0 out; gpio write 0 1" in the crontab file doesn't turn on the led.

Thanks in advance for any pointer

Re: wiringPi gpio command not working from crontab

Posted: Sun Apr 17, 2016 6:34 pm
by joan
If you had tested every single possible configuration it would be working.

In crontab use the full path to executables and files. Do not assume they are in the current environment's path.