FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


problem with cronjobs





programitv
Hello,

I do have some URLs I need to run regularly and I tried to configure a cron job for that. So far I am not succeeding to have my scripts run, so I am wondering if I am doing everything correctly.

I created a .php file, yyyy.php, with the following content (I replaced the URL and the name of the file):

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://xxxxxxxx");
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);

whereas in the cron jobs:

04 20 * * * /usr/local/bin/php -q /home/xxxxx/domains/tttttttttttttt.frih.org/public_html/yyyy.php

I tried to set /usr/local/bin/php with and without /local/ but no result.

Can you help please?
Thank you in advance for your time.
rvec
/usr/local/bin/php -q /home/rvec/domains/rvec.frih.net/public_html/index.php

That works for me on the frih.net server. It should also work on frih.org.
programitv
Thanks for your answer... but it is exactly what I have set and it does not work Sad((...
And I am not getting any email..
P.S. My control panel is Direct Admin.

Thank you for your support.
programitv
I was reading through the forum and was wondering maybe it was due to the fact the url was taking time to open.. but now I am sure it is a problem with the cronjobs.

I created a short script:

// open file
$fd = fopen("rr.txt", "a");

// write string
fwrite($fd, "coucou");

// close file
fclose($fd);


which if I run by using my browser, www.mydomain.com/xxx.php updates rr.txt.

If I try to set it as cronjob, nothing is printed in the file. I tried the following configurations:

18 22 * * * /usr/local/bin/php -q /home/myname/domains/mydomain.frih.org/public_html/xxx.php/

19 22 * * * /usr/bin/php -q /home/myname/domains/mydomain.frih.org/public_html/xxx.php/

21 22 * * * /usr/bin/lynx -source http://www.mydomain.com/xxx.php

31 22 * * * /usr/local/bin/lynx -source http://www.mydomain.com/daily.php


I saved the config 3 mins before each schedule.

Please if someone knows what can be done. Thanks and best regards.
Related topics
Problem with Subdomains
Strange Fire fox problem
Logout problem (Cookie?)
How to solve this problem? Thanks
I have a problem....Mozilla Firefox
post nuke problem
anyone had this phpBB problem?
phpbb problem....
Problem with my password
Pictures problem...
database problem
same problem over here...
Transport yourself over the Net
Header("Location: PROBLEM");
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.