Crontab doesn't run Wget with a url with parameters
I'm using Aptana Cloud without root access.
WORKS:
* * * * * /usr/sfw/bin/wget -qO- 'http://myproject.aptanacloud.com/myproject/myphp.php' | /bin/mail mymail@mymail.com
DOESN'T WORK!:
* * * * * /usr/sfw/bin/wget -qO- 'http://myproject.aptanacloud.com/myproject/myphp.php?param1=blog%2frss2.xml' | /bin/mail mymail@mymail.com
I tried either unsuccessfully url with quotes, double quotes or without quotes. Any idea?
开发者_开发知识库Thanks!
From:
man 5 crontab
Percent-signs (%) in the command, unless escaped with backslash (), will be changed into newline characters, and all data after the first % will be sent to the command as standard input.
Just out of curiosity: have you tried doing it without the %2f and using a straight forward slash instead? Maybe it's the encoding there that's breaking something.
精彩评论