I have a simple cronjob running every day at 18:35:
05 18 * * * ~/job.sh 2>&1 >> ~/job.log
So the output of ~/job.sh should be
You need to redirect the output of the python script. Learning Python 2nd Edition recommends the following:
import sys
sys.stdout = open('log.txt', 'a') # Redirects output to file
...
print x, y, x # shows up in log.txt
and goes on to say:
"Here, we reset
sys.stdout
to a maually-opened output file object opened in append mode. After the reset, everylog.txt.
instead of the original output stream."