Reputation: 185
My application run on hostgater.com . i created a Cron job scheduler in my server and set all those parameters.
it working good far
command parameter like /home3/user/public_html/sendemial.php.
it is not workging i try to execute the MVC controller action URL like
command parameter like http://voola.org/user/sendemail
i also tried to using iframe, but it is not workin. i am very worry about to execute direct url in Hostgater server.
any help will be appreciate :)
Upvotes: 2
Views: 685
Reputation: 185
examoleThanks @Orangepill, you are great. using curl its working charm. below is my code example
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://sadf/profiles/emailalert");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
$result=curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
if($result){
echo "execute by curl ok and sending mail";
}else{
echo "not execute curl funation";
}
Upvotes: 2
Reputation: 3675
Read the manual for running from command line:
http://ellislab.com/codeigniter/user-guide/general/cli.html
Upvotes: 0