PHP Cron

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.

I just have the following in my crontab:

*/5 * * * * /home/username/domainname/scripts/watch.phpI have the script CHMOD’ed to 755.

Best of luck,

[color=#000000]DreamHost Promo Code[/color]: [color=#CC0000]Save $50[/color] with the promo code DREAMTEAM

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


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.

i ve been using cron to run php scripts as follows:
58 * * * * wget -q
and its been working.

also i ve used:
58 * * * * lynx -dump

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

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!!!


Oh yeah – I forgot to reveal that I’m a Linux n00b. I’m trying, though… :frowning: