PDA

View Full Version : cronjob



Ronon
01-10-2008, 12:23 PM
I'm try to run a cronjob, but I'm not sure what I'm doing wrong.

I have a php test file that I'm uing right now to test the cronjob

<?php

//Filename: /home/******/domain/*********.com/public_html/crontest.php

mail ("me@myaddress.com", "Cron Successful!", "Hello World!");

?>

This is the actual cronjob that I set up

*/1 * * * *
/home/******/domain/*********.com/public_html/crontest.php


I am fairly sure the path is correct.

When I call the crontest.php file manually via a web web browser it works,
but not when the cronjob is suspossed to send it.


I have a dedicated server, and the domain I'm using is on one the the Reseller Accounts.

Any ideas where I'm going wrong here?

iceuk626
01-10-2008, 02:09 PM
Firstly you need to chage domain to domains i.e:


/home/<username>/domains/<domainname>/public_html/<filename>.php

you may need to add the cronjob like this:


/usr/local/bin/php -q -f /home/<username>/domains/<domainname>/public_html/<filename>.php

Ronon
01-12-2008, 10:38 PM
Firstly you need to chage domain to domains i.e:


/home/<username>/domains/<domainname>/public_html/<filename>.php

you may need to add the cronjob like this:


/usr/local/bin/php -q -f /home/<username>/domains/<domainname>/public_html/<filename>.php

Thanks, that work!