0

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?

  • which magento version are using – Amit Bera Aug 22 '14 at 15:56
  • You can manually fire the cron by running yourstoredomain.com/cron.php – Eirik Aug 22 '14 at 19:11
  • Ah, lazyhosting... Have a remote workstation with a scheduled curl or wget job that calls cron.php every 15 minutes. Don't shut off that workstation and make sure it has internet access 24/7. You don't need cron to function because of that extension. You need cron to function so Magento functions. – Fiasco Labs Oct 14 '14 at 0:30
1

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

0

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..

  • thanks for the reply! I try your solution but it doesn't work... have I change SCRIPT_NAME and SCRIPT_FILENAME ? – Mma87 Aug 25 '14 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.