I used the following taken from (note: broken link, code copied below):
http://www.premasolutions.com/content/magento-dataflow-exportimport-form-command-line
<?php
$profileId = 8;
require_once 'app/Mage.php';
umask(0);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$profile = Mage::getModel('dataflow/profile');
$userModel = Mage::getModel('admin/user');
$userModel->setUserId(0);
Mage::getSingleton('admin/session')->setUser($userModel);
$profile->load($profileId);
if (!$profile->getId()) {
Mage::getSingleton('adminhtml/session')->addError('ERROR: Incorrect profile id');
}
Mage::register('current_convert_profile', $profile);
$profile->run();
$recordCount = 0;
$batchModel = Mage::getSingleton('dataflow/batch');
echo "EXPORT COMPLETE. BATCHID: " . $batchModel->getId();
It worked correctly on 1.5.x (not yet tested on 1.6.x, sorry).
If this works, you only need to schedule the cron job to automatically invoke the script.
Regards, Alessandro
source
share