|
Май 07
2014
|
|
в cron.php - должен быть прописан Host и задание должно стоять в планировщике на хостинге
Крон на хостинге настроил.
Вот содержание крона компонента :
<?php
/** test
* @category Cron
* @package JomSocial
* @copyright (C) 2008 by Slashes & Dots Sdn Bhd - All rights reserved!
* @license GNU/GPL, see LICENSE.php
*/
// !IMPORTANT! Remove this line for the script to work
defined('_JEXEC') or die('Restricted access');
// Change the $hostname to your site's URL
$hostname = 'trendyclub.org';
// If you have subfolder on your main site, specify it here. Should not end or begin with any trailing slash.
$subfolder = '';
if( $hostname == 'www' )
{
return;
}
$resource = @fsockopen( $hostname , 80 , $errorNumber , $errorString );
if( !$resource )
{
echo 'Error connecting to host';
return;
}
$output = "GET /" . $subfolder . "/index.php?option=com_community&task=cron HTTP/1.1rn";
$output .= "Host: " . $hostname . "rn";
$output .= "Connection: Closernrn";
fwrite( $resource , $output );
fclose( $resource );
echo "Cronjob processed.rn";
return;
настройка Crona на хостинге типа:
Настройте крон через панель Вашего хостинга, прописав в команде для запуска строку
lynx -source "http://www.ваш_сайт_ru/index.php?option=com_community&task=cron" > /dev/null
и выставив время выполнения задачи.
подробности на форуме вот тут! http://joomlaforum.ru/index.php/topic,87529.30.html