I have to use this extension and I haven't access to cron jobs in my hosting.
I read that is possible to use cron.php also without access to cron jobs, how can I do this task?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI have to use this extension and I haven't access to cron jobs in my hosting.
I read that is possible to use cron.php also without access to cron jobs, how can I do this task?
You can set a cronjob in another hosting account to access the magento cron.php file, something like this
10 * * * * wget -O - http://magento-site.com/cron.php >/dev/null 2>&1
check this link for more info Using CRON jobs to visit url?
Thanks
create a file mycron.php on magento dir and add below code in this file
<?php
// Change current directory to the directory of current script
chdir(dirname(__FILE__));
require 'app/Mage.php';
if (!Mage::isInstalled()) {
echo "Application is not installed yet, please complete install wizard first.";
exit;
}
// Only for urls
// Don't remove this
$_SERVER['SCRIPT_NAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_NAME']);
$_SERVER['SCRIPT_FILENAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_FILENAME']);
Mage::app('admin')->setUseSessionInUrl(false);
umask(0);
try {
Mage::getConfig()->init()->loadEventObservers('crontab');
Mage::app()->addEventArea('crontab');
Mage::dispatchEvent('always');
Mage::dispatchEvent('default');
} catch (Exception $e) {
Mage::printException($e);
exit(1);
}
hint this file on browser..