in the crontab i add: 10,20,30,40,50,59 * * 10 * /home/username/bin/sendmail.py >> ~/logs/user/cron.log 2>&1 in my python scripts is:
but it can't work. hope you can help me, 3Q! asked 17 Oct '12, 04:00 bojanliu |
Hi, It seems that you've edited the sendmail.py script with some Windows-style editor such as Notepad that adds extra carriage returns at the end of each line. You should use a more advanced editor such as Ultraedit instead, that can save files in UNIX format. To fix this file, you can run "dos2unix ~/bin/sendmail.py" in SSH. answered 17 Oct '12, 04:44 todork |
Hi, do you have any errors logged at ~/logs/user/cron.log ? Please post them here.
the errors is: /usr/bin/env: python2.7^M: No such file or directory /usr/bin/env: python2.7^M: No such file or directory