When I run this command, the output message is being saved into ok.txt:
/home/admin/virtualenvs/x.com/bin/python /home/admin/www/x.com/x/app/manage.py help | tee ok.txt
I have this cronjob:
* * * * * /home/admin/virtualenvs/x.com/bin/python /home/admin/www/x.com/x/app/manage.py help | tee ok.txt
But nothing is saved to ok.txt
When I see the cron log
> sudo grep CRON /var/log/syslog
May 10 22:16:01 localhost CRON[23397]: (admin) CMD (/home/admin/virtualenvs/x.com/bin/python /home/admin/www/x.com/x/app/manage.py help | tee ok.txt)
No hints here, what am I doing wrong? thanks in advance.
try with this :
* * * * * /home/admin/virtualenvs/x.com/bin/python /home/admin/www/x.com/x/app/manage.py help > /tmp/ok.txt 2&>1
it should put all outputs (stderr and stdout) into your ok.txt file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With