I am automatically running a simple python program from start up using cron
. The pi boots / automatically logs in, displays the command line and runs the python program but the print output (updating count) is not displayed.
The print output works fine if I run the program via idle (ie having enabled LXDE) and it also works fine if (without running the LXDE desktop) I manually run the program from the command line, e.g. sudo python pimon.py
What is needed to see the print output when I start the program using cron
?
I do not want to have to enable the LXDE desktop first.
The crontab entry is: @reboot python /home/pi/Python27/pimon.py
cron
simply has no console to print its output too. The behaviour you describe is perfectly normal. Best way to work around: make your script output to a file. – Ghanima Apr 02 '15 at 17:29