I have a DSB18B20 temperature sensor and would like to log the readings in a csv file.
I have a script templog.py that stores the readings in a file. The file starts with
#!/usr/bin/python That works.
When I run
/usr/bin/python /home/pi/mypath/templog.py the script runs as well.
I then tried to add a crontab for that.
sudo chmod -x templog.py
I was in the correct path for that, therefore no absolute path given.
sudo crontab -e * * * * * /home/pi/mypath/templog.py /1 * * * * /home/pi/mypath/templog.py */1 * * * * /home/pi/mypath/templog.py /1 * * * * /usr/bin/python /home/pi/mypath/templog.py /1 * * * * sudo /usr/bin/python /home/pi/mypath/templog.py
Neither of this works.