Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Programming Help > PHP Programming Help

PHP Programming Help Post any question relating to PHP Programming here and hopefully someone can help.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-10-11, 06:07 AM
Junior Member
 
Join Date: Oct 2007
Posts: 1
Sixu is on a distinguished road
Default Cron Job isn't doing anything (MMORPG)

I'm really confused about this particular problem i'm having, this particular syntax:

0,30 * * * * /usr/bin/lynx -dump http://localhost/cwars/hourly.php?server_passwd=mypassword

used to work not so long ago, either my host has changed something recently to my account or else i've done something.

basically there are two php files i want cron to hit up, once an hour and the other once a day.

I've tried all of the following variations:

/usr/bin/lynx -dump http://localhost/cwars/hourly.php?server_passwd=mypassword

/usr/local/bin/lynx --dump http://www.12colonies.net/cwars/hourly.php

root /usr/local/bin/lynx - -dump /home/myusername/public_html/cwars/hourly.php?server_passwd=mypassword

/usr/bin/curl /home/myusername/www/cwars/hourly.php?server_passwd=mypassword

/usr/bin/php -q /home/myusername/www/cwars/hourly.php?server_passwd=mypassword

/usr/bin/php -q /home/myusername/www/cwars/hourly.php?server_passwd=mypassword

/usr/bin/lynx -dump /home/myusername/public_html/cwars/hourly.php?server_passwd=mypassword

/home/myusername/www/cwars/hourly.php

wget -qO - http://localhost/cwars/hourly.php?server_passwd=mypassword

everyone of these have been set to: */10 or 5,35. I do not get an email from any of them and by default my email address is on the crontab to forward me the data.

manually typing in the address to the php files does work to update the game, so i'm completely at a loss what to do next. I have contacted my host about lynx and to see if the interpreter directory has been moved, in the meantime if anyone has any other suggestions? I'm new to this, as you can imagine.

Last edited by Sixu; 2007-10-11 at 02:26 PM.
Reply With Quote
  #2 (permalink)  
Old 2007-10-12, 12:33 AM
Xnuiem's Avatar
Senior Member
 
Join Date: May 2004
Location: DFW, Texas
Posts: 1,104
Xnuiem will become famous soon enough
Send a message via Yahoo to Xnuiem
Default

if you are calling it via CGI, ie /usr/bin/php you can't use ?server_passwd, you will need to use argv to get the input.

Using lynx is a horrible idea in this case, since basically you are passing this stuff in the clear, it is way better to use a protected file and CGI it so it can only be called from the command line.

Once an hour would be:

15 * * * *

Once a day would be

15 15 * * *

I dont know what you are trying to do with those other options, but they are not the most direct route.
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.

Last edited by Xnuiem; 2007-10-12 at 12:40 AM.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:37 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.