phpmagentomagento-1.7magmi

Methods to automate magmi


Can anyone tell me how to automate magmi to perform import on scheduled time every day.

I have heard that it can be done via cli but dont know how to use cli.

Please give me a step wise procedure about how to cli and what commands to use for automating imports.

I saw magmi wiki site could not understand much about how to use cli.

Please give me a proper solution about how can i automate magmi.

I even tried to use below link but it is now working

wget "http://user:password@example.com/magmi/web/magmi_run.php?mode=create&profile=default&engine=magmi_productimportengine:Magmi_ProductImportEngine&CSV:filename=/magmitest.csv" -O /dev/null

Solution

  • we can also automate via curl command its quite easy by that

    $url="http://learning.iksuladev.com/satyendra/magmi/web/magmi_run.php?mode=create&profile=satyendra&engine=magmi_productimportengine:Magmi_ProductImportEngine&CSV:filename=../../var/import/sample.csv -O /dev/null";
    
    $ch = curl_init($Url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, '');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $result = curl_exec($ch);
    curl_close($ch);