I entered this command to execute:
* * * * * python/home/pi/Desktop/sensor.py >> /var/log/gasdetails.log 2>&1
but it gives an info:
Dec 22 21:08:01 raspberrypi CRON[2070]: (CRON) info (No MTA installed, discarding output)
I entered this command to execute:
* * * * * python/home/pi/Desktop/sensor.py >> /var/log/gasdetails.log 2>&1
but it gives an info:
Dec 22 21:08:01 raspberrypi CRON[2070]: (CRON) info (No MTA installed, discarding output)
As I understand it, this message informs you that your cron job has been executed, but output produced by it cannot be mailed to you because there is no Mail Transfer Agent installed on this machine.
I only wonder what output could it produce if you redirected everything to file. As one of the comments suggests, it may be an error message related to the fact that you probably don't have a file python/home/pi/Desktop/sensor.py
on your system, so it cannot be executed. If you want to have the file /home/pi/Desktop/sensor.py
executed by python
interpreter (which is probably what you meant), you should write it as python /home/pi/Desktop/sensor.py
(note the space).
Or do it "the proper Linux way" ;) - insert #!/usr/bin/python
as the first line of your script, make the file executable and call it just as /home/pi/Desktop/sensor.py
python
with the name of your program as its argument then you need to separate them with whitespace ex.python /home/pi/Desktop/sensor.py
– steeldriver Dec 22 '20 at 15:57