I have a simple python project to water my plants, it works with a Raspberry and RaspberryPi os lite.
In the project I have a package named app
with a __main__.py
to launch it, I just type python -m app
in the terminal and it works fine.
I tried to make a crontab with * * * * * /usr/bin/python /home/pi/djangeau/app
Nothing happens, whereas if I launch a simple python test script it does.
The cron log gives me that error : 'No MTA installed, discarding output' , not sure this is useful to solve the problem.
I hope I was clear enough. Thank you for your answers. Vincent
Crontab and python project
203 views Asked by Vincent74 At
2
Finally I figured out:
For exemple that command in bash :
python -m app
is equivalent to this one for a crontab :* * * * * cd /home/pi/djangeau && /usr/bin/python -m app
Just replace the correct path and stars by the schedule you want