var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
Cron not working for PHP arguments
mydomain.com is hosted on a cPanel + RHEL 5.3 server.
I did set up the cron as follows to reset the stats on the site:
00 8 * * 0 /usr/bin/curl http://www.mywebsite.com/index.php?m=WebTraffic&a=reset
This way used to work on other scripts, but on this one seems to not parse the arguments passed trough php (?m=WebTraffic&a=reset), it just load the index.php even running the command out of the cron, just from the shell. However, running the cron from a web browser does work, it reset the stats.
I have also tried wget and it's exactly the same, from shell it doesn't work, just load the index, not the arguments, and from web works fine..
Any ideas about what I'm I missing?
What you could do is
00 8 * * 0 /path/to/my/script.sh
then in script.sh have
and make script.sh executable.
Thanks for your suggestion, but, wouldn't that be the same? As said before, from shell is not working... the curl command inside a shell script would make any difference?
Its how I have got round such issues in the past.. I think that cron doesnt like the "?"
Use lynx http://URL
Thanks for your suggestions eth10, but it seems to be the same, launched lynx from the shell and it doesn't get the php arguments, it just load the index
By LP560 in forum Hosting Security and Technology
Last Post: 06-20-2007, 05:35 AM
By stuartornum in forum Hosting Security and Technology
Last Post: 06-09-2007, 12:41 PM
By n00ber in forum Hosting Security and Technology
Last Post: 01-25-2006, 11:02 PM
By Eiv in forum Hosting Security and Technology
Last Post: 01-22-2002, 07:13 PM
By tymonhall in forum Dedicated Server
Last Post: 04-09-2001, 05:13 PM