Cron job is not working

Aziz

Verified User
Joined
Oct 4, 2004
Messages
125
This time I am sure that the values (times are correct), I setted it up to run every minute but it wont..

When I try to run it via command prompt it runs ok, what should I do to make the cron job work?

Peace,
 
Do you have root access to this server (are you the owner)

Do any cronjobs work? Try just a simple one like touch /home/username/cron_status
and if that files is created then you know it's working and it's a problem with your command or the script your trying to execute.

What is the cronjob you are trying to run?
 
jmstacey said:
Do you have root access to this server (are you the owner)

Do any cronjobs work? Try just a simple one like touch /home/username/cron_status
and if that files is created then you know it's working and it's a problem with your command or the script your trying to execute.

What is the cronjob you are trying to run?

yes I am the owner,

I tried the cron job you gave me and it worked,

the cron job I want to run is a PHP file:

php /home/username/domains/domain.com/public_html/aa.php

I even tried one with a simple mail statement and it wont work..

I have tried it before and it worked, but no it doesnt..

Thanks for any help,
Aziz
 
You might need to specify the full path to the php binary.
A "whereis php" or "which php" command can give you this information, but it's usually /usr/local/bin/php

So it might look something like this:
Code:
/usr/local/bin/php -q -f /home/username/domains/domain.com/public_html/aa.php
 
jmstacey said:
You might need to specify the full path to the php binary.
A "whereis php" or "which php" command can give you this information, but it's usually /usr/local/bin/php

So it might look something like this:
Code:
/usr/local/bin/php -q -f /home/username/domains/domain.com/public_html/aa.php

It seems to work fine..

thanks alot for the help :)

Peace,
 
Back
Top