Skip to main content
added 57 characters in body
Source Link
Zdenek
  • 131
  • 1
  • 5

The likely cause is that gpio isn't in the PATH available in cron. Specify the full path to your gpio command, such as

getval="$(/sbin/gpio read 17)" 

Find out where it is on your system using which gpio.

I got bitten by this before because I tinker with embedded solutions a lot. If the script is more complex, I usually initialize PATH and LD_LIBRARY_PATH near the start to make things easier.

The likely cause is that gpio isn't in the PATH available in cron. Specify the full path to your gpio command, such as

getval="$(/sbin/gpio read 17)" 

I got bitten by this before because I tinker with embedded solutions a lot. If the script is more complex, I usually initialize PATH and LD_LIBRARY_PATH near the start to make things easier.

The likely cause is that gpio isn't in the PATH available in cron. Specify the full path to your gpio command, such as

getval="$(/sbin/gpio read 17)" 

Find out where it is on your system using which gpio.

I got bitten by this before because I tinker with embedded solutions a lot. If the script is more complex, I usually initialize PATH and LD_LIBRARY_PATH near the start to make things easier.

Source Link
Zdenek
  • 131
  • 1
  • 5

The likely cause is that gpio isn't in the PATH available in cron. Specify the full path to your gpio command, such as

getval="$(/sbin/gpio read 17)" 

I got bitten by this before because I tinker with embedded solutions a lot. If the script is more complex, I usually initialize PATH and LD_LIBRARY_PATH near the start to make things easier.