My problem is that crontab is not executing my php script /home/pi/CronTabFiles/saveThermometer.php
I tried a lot of things, I don't remember everyone of them but I'll list what i consider mains one.
-This is how my basic crontab line looks like:
mm hh * * * /usr/bin/php /home/pi/CronTabFiles/saveThermometer.php
home, pi and CronTabFiles folders have set permissions to 777.
This result in an email with this text: Could not open input file: /home/pi/CronTabFiles/saveThermometer.php
- I tried to make a simple .sh file with this code
#! /bin/sh
php /home/pi/CronTabFiles/saveThermometer.php
and this results in /bin/sh: 1: /home/test.sh
: not found
- I tried also wget, curl and lynx but they didn't work as well
I will take any help that will make crontab executing my php or shell scripts.
Edit 1: Permisions to save thermometer.php are also set to 777.
Edit 2: I tried www-data and root crontab, both didn't work. My crontab is only executing simple commands such as gpio write 0 1.
When I manually do this command:
php /home/pi/CronTabFiles/saveThermometer.php
Everything works well.
saveThermometer.php
?