PHP Cron

PHP Cron

Posted by: premkumarcv
Posted on: 2006-01-15 03:18:00

I tried the following commands, but nothing seems to work...

*/5 * * * * /home/username/domainname/test/cronemailtest.php

*/5 * * * * /usr/local/bin/php /home/username/domainname/test/cronemailtest.php

Need Help.

Re: PHP Cron

Posted by: doeleman
Posted on: 2006-01-15 06:08:00

I just have the following in my crontab:

*/5 * * * * /home/username/domainname/scripts/watch.php

I have the script CHMOD'ed to 755.

Best of luck,


Re: PHP Cron

Posted by: matttail
Posted on: 2006-01-15 10:43:00

what's the problem? What error message are you getting?



-Matttail

Re: PHP Cron

Posted by: premkumarcv
Posted on: 2006-01-16 20:53:00

Support said i need to add php. But still it is not working and also there is no error messages emailed to me.

i tried */5 * * * * php /home/username/domainname/test/cronemailtest.php

And also i changed CHMOD to 777

But still no success.

What i have to do ? Where it is wrong ?

PHP script works fine when it is tested.

Re: PHP Cron

Posted by: smarty
Posted on: 2006-01-19 09:37:00

i ve been using cron to run php scripts as follows:
58 * * * * wget -q http://domain.com/path/to/myscript.php
and its been working.

also i ve used:
58 * * * * lynx -dump http://domain.com/path/to/myscript.php

i did in fact come here to ask a question about difference in wget run in a cron and run straight from ssh.. that will be a different post!

good luck
m

Re: PHP Cron

Posted by: Naphthalene
Posted on: 2006-10-07 14:28:00

I was searching the forums for potential problems running a php script in a cronjob using lynx -dump. Currently, that's the only way I can get the script to run: for some reason, the whole /dh/cgi-system/php.cgi thing doesn't work for me -- keeps returning a 404...

So I've set it up to use lynx. The only potential problem I'm worried about is that the script lives in a password-protected directory, and I have to include -auth=username:pass in order for the script to execute...

If anyone else has discovered any magical ways to get the php.cgi to run properly, please let me know!!!

Thanks!

Oh yeah -- I forgot to reveal that I'm a Linux n00b. I'm trying, though... :(Edited by Naphthalene on 10/07/06 02:28 PM (server time).

Tags: php 5domainnamecronusrlocalhelp