How to run a dataflow profile using external script


Put below PHP script in your magento site's root directory.
<?php

$profileId = 1; // Enter the export profile number from System > Import/Export > Profiles

require_once('app/Mage.php');
umask(0);
Mage::app('admin');

$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();

echo "EXPORT COMPLETE.\n";
?>

Now access this script http://YOUR_SITE/FILENAME_YOU_GIVEN_TO_ABOVE_SCRIPT