cronjob not working

AlexMcCann

Verified User
Joined
Jun 29, 2007
Messages
27
i have problems seting cronjobs - they dont want to work

for instance:

Minute Hour Day of
Month Month Day of
Week Command Select
*/35 * * * * /home/admin/domains/xxxx.com/public_html/admin/yyyy.php

-it dosent work

but if i run the file in browser than it works

i tried several things but nothing worked. Any ideas what i am doing wrong?

Thanks!
 
php programs run through your browser aren't run by the standalone php interpreter but rather by a php module installed into apache.

To test the program you'll need to try that command from the shell command line.

Even that may not be a good test, because the browser runs the program as user apache, and you'll most likely be testing it as some other user.

I'd do:
Code:
$ whereis php
to find out where your php program is located, and then try:
Code:
$ /complete/path/to/php /home/admin/domains/xxxx.com/public_html/admin/yyyy.php
to see if it works that way, and then if it does, put it into your cronjob that way.

Jeff
 
Code:
$ /complete/path/to/php /home/admin/domains/xxxx.com/public_html/admin/yyyy.php
to see if it works that way, and then if it does, put it into your cronjob that way.

Jeff
This helped me, too. Thank you, Jeff!
 
cronjob to run php script

im having trouble getting cronjobs to run a php script.
where do i find the shell command line ?

please help. pat
 
You do a shell login. Of course you can't do that unless your hosting company allows it. Your best course of action is probably to contact your hosting company.

Jeff
 
Back
Top