Ultimate Guide to Multi Channel Sofwtare Book
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

mail_open
Automatic import with magmi (cron job?)
christopher.oliver

Excellent
July 18, 2014 - 3:00 pm
Member Since: June 27, 2014
Forum Posts: 18
sp_UserOfflineSmall Offline

Hi,

could you help me make magmi to automatically run imports, without me logging in every day and clicking run import

Thank You
Chris

Sebastien BRACQUEMONT

Excellent
July 18, 2014 - 5:30 pm
Member Since: January 9, 2014
Forum Posts: 34
sp_UserOfflineSmall Offline

magmi is conceived to run also within a cron job using magmi cli.

In the UI, a specific plugin called “Magmi URL UI” give you the command line to execute with the mode you want for the current chosen profile in UI.

If i remember, Matt has made some video about how to setup cron jobs via cpanel.

Matthew Ogborne

Founder
July 19, 2014 - 10:00 am
Member Since: July 18, 2013
Forum Posts: 4564
sp_UserOfflineSmall Offline

Howdy Chris, Sebastien,

Chris, Magmi has a CLI interface or “Command Line” option that allows you to run Magmi from a PHP script or from a SSH console.

After selecting a profile in Magmi and pressing save, there is as Sebastien suggests a “Magmi URL UI” plugin which is enabled in the UE version of Magmi, click this and you’ll get a command to run Magmi with that profile.

It’s that profile you can then run via the commandline or in an external script or via the cron.

The thing to note is that the easier way to do this is to create a new Magmi profile and set the options you desire and file name, and then run that profile. It does mean that you’ll need to keep the filename that you import each time the same, but it can be automated.

Matt

PS. The tutorial for creating a cron is on this page https://understandinge.com/tutorial/mwf-0032/

"Selling an item online is easy, but making living from a business that sells online, well that’s something different entirely!"


Ultimo Magento Theme
christopher.oliver

Excellent
July 21, 2014 - 8:16 am
Member Since: June 27, 2014
Forum Posts: 18
sp_UserOfflineSmall Offline

Good Morning Sebastien & Matt,

Thanks very much for the speedy response on Friday, I just could not bring myself to give it ago over the weekend! ha

Will be giving this ago later today, thanks for the help both and the link to turtorial Matt (which I have never had trouble following and getting the results I want). I should be able to do this no problem.

Thanks
Chris

TheWebsiteGuy (Chris Astley)
support@thewebsiteguy.xyz

Partner
July 21, 2014 - 5:50 pm
Member Since: November 8, 2013
Forum Posts: 100

I use Magmi via cron multiple times a day but part of a larger process where the Magmi import is the last step.

exec(‘wget "magmiurlformydomain.co.uk/magmi/web/magmi_run.php?mode=update&profile=AUTO+Stock+Update&engine=magmi_productimportengine:Magmi_ProductImportEngine" -O /dev/null’);

The above is what I use as part of my script to trigger Magmi.

Chris

christopher.oliver

Excellent
July 24, 2014 - 2:54 pm
Member Since: June 27, 2014
Forum Posts: 18
sp_UserOfflineSmall Offline

Matt, Chris & Sebastian,

Thanks for your posts!! I have this running as sweet as a nut now..Thanks for your help, it is much appreciated!! Cool

Regards
Chris

spykey

New
September 29, 2014 - 10:50 am
Member Since: September 27, 2014
Forum Posts: 3
sp_UserOfflineSmall Offline

Chris Astley said

I use Magmi via cron multiple times a day but part of a larger process where the Magmi import is the last step.

exec(‘wget "magmiurlformydomain.co.uk/magmi/web/magmi_run.php?mode=update&profile=AUTO+Stock+Update&engine=magmi_productimportengine:Magmi_ProductImportEngine" -O /dev/null’);

The above is what I use as part of my script to trigger Magmi.

Chris

Hello Chris,
can you please explain how you use magmi to update products or stocks?

Thank you!

TheWebsiteGuy (Chris Astley)
support@thewebsiteguy.xyz

Partner
September 29, 2014 - 10:54 am
Member Since: November 8, 2013
Forum Posts: 100

spykey said

Chris Astley said

I use Magmi via cron multiple times a day but part of a larger process where the Magmi import is the last step.

exec(‘wget "magmiurlformydomain.co.uk/magmi/web/magmi_run.php?mode=update&profile=AUTO+Stock+Update&engine=magmi_productimportengine:Magmi_ProductImportEngine" -O /dev/null’);

The above is what I use as part of my script to trigger Magmi.

Chris

Hello Chris,
can you please explain how you use magmi to update products or stocks?

Thank you!

Hi, That’s a bit of an open ended question to be honest. I use Magmi for many reasons revising data from simple stock adjustments, pricing and stock sync and auto product adding.

Chris

Sebastien BRACQUEMONT

Excellent
September 29, 2014 - 12:08 pm
Member Since: January 9, 2014
Forum Posts: 34
sp_UserOfflineSmall Offline

The best way to cron magmi is not to use “wget” (since it accesses the script through web url and may suffer php web model limitations (like max_execution_time).

instead, you should prefer “magmi cli” interface,that will use php command line.

with a command line like:

php <magmi_dir>/cli/magmi.cli.php -profile="yourprofilename" -mode="create"

(to create new & update existing for profile “yourprofilename”)

or

php <magmi_dir>/cli/magmi.cli.php -profile="yourprofilename" -mode="update"

(to update existing only for profile “yourprofilename”)

see :http://wiki.magmi.org/index.ph…..mmand_line

Paul Cartwright
West Midlands, UK

Partner
June 9, 2015 - 3:52 pm
Member Since: January 7, 2015
Forum Posts: 413
sp_UserOfflineSmall Offline

I am trying to automate magmi via wget. I got the command from the UE version of magmi but when I call via the cron I get this error

Notice: Undefined index: engine in /…/…/public_html/magmi-importer/web/magmi_run.php on line 9

That is referring to this line

$engine_name=$engdef[0];

Notice: Undefined offset: 1 in /…/…/public_html/magmi-importer/web/magmi_run.php on line 11

That is referring to this line

$engine_class=$engdef[1];

Warning: require_once(../engines/.php): failed to open stream: No such file or directory in /…/…/public_html/magmi-importer/web/magmi_run.php on line 12

That is referring to this line

require_once("../engines/$engine_name.php");

I cannot find engine_name.php anywhere

Fatal error: require_once(): Failed opening required ‘../engines/.php’ (include_path=’.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php:/…/…/public_html/magmi-importer/inc:/…/…/public_html/magmi-importer/integration/inc:/…/…/public_html/magmi-importer/engines’) in /…/…/public_html/magmi-importer/web/magmi_run.php on line 12

Trying to expand my knowledge but currently failing and its probably basic error that I have made, so any help gratefully received

Thanks
Paul

Everyday is an opportunity to learn something new
jacobanthonystapleton

New
January 15, 2016 - 10:21 am
Member Since: April 13, 2015
Forum Posts: 1
sp_UserOfflineSmall Offline

Hi,

I am looking to automate a profile setup in MAGMI with UE UI. I think I am missing something though.

I have setup a CRON in cPanel using the video above, what file/script do I need to create or amend to run the profile I have setup?

Would I place the code from MAGMI Import URL UI into the ‘Command:’ text area to run the profile?

Many thanks,

Jake.

SOLVED, automation works with the method in my last question. Thank you.

Badeth - UE
Member
January 16, 2016 - 8:20 am
Member Since: October 23, 2015
Forum Posts: 513
sp_UserOfflineSmall Offline

Happy that you’ve got to the bottom of it, Jake

Kalpesh Adhvaryu

New
February 5, 2017 - 11:06 pm
Member Since: February 5, 2017
Forum Posts: 3
sp_UserOfflineSmall Offline

By following things, i got this error, can anyone tell me what is that and why is that …

/bin/sh: magmi-importer: No such file or directory

Kalpesh Adhvaryu

New
February 5, 2017 - 11:21 pm
Member Since: February 5, 2017
Forum Posts: 3
sp_UserOfflineSmall Offline

Now there is another error

Status: 404 Not Found
Content-type: text/html; charset=UTF-8

No input file specified.

Rodney - UE
Admin
February 7, 2017 - 7:17 am
Member Since: June 6, 2016
Forum Posts: 338
sp_UserOfflineSmall Offline

Kalpesh Adhvaryu said
Now there is another error

Status: 404 Not Found
Content-type: text/html; charset=UTF-8

No input file specified.  

Hello there. How did the 404 error came about? Maybe you can tell us what you were doing before it happened. Also, a screenshot of the error would also help.

Rodney

Kalpesh Adhvaryu

New
February 7, 2017 - 8:35 am
Member Since: February 5, 2017
Forum Posts: 3
sp_UserOfflineSmall Offline

Hello Rodney,

I am attaching the screenshots and explaining you what we are doing,

We have tried my cron scripts like :
Tried: php magmi.cli.php -mode=update -profile=autoimport -CSV:filename=”/home/domain/public_html/var/import/somatest.csv”
Tried: php /cli/magmi.cli.php -profile=”yourprofilename” -mode=”update”

and even few more but every cron jobs throws the same email results that contains the code:

Now there is another error
Status: 404 Not Found
Content-type: text/html; charset=UTF-8
No input file specified.

We just simply wants to add cron to our cpanel, which triggers the CSV file at var/import with a magmi profile

I hope

Rodney - UE
Admin
February 10, 2017 - 8:02 am
Member Since: June 6, 2016
Forum Posts: 338
sp_UserOfflineSmall Offline

Perhaps @Paul Cartwright can have a look at it…

Rodney

 

Why Should You Join UnderstandingE?

 
  • Access to over 400 step-by-step video tutorials
  • More than a dozen video courses available
  • Magento, M2E Pro, Magmi, eBay, Amazon & Design all covered
  • Everything is in 100% Plain English
  • Learn how to build your own multi-channel software for eBay & Amazon
  • Access to the community forums, meet fellow business owners like yourself

Join Now with 2 Clicks

 

Join now for less that £1 per day you can gain access to over 400 step-by-step video tutorials & learn how to build your very own multi-channel software.

 

Forum Timezone: Europe/London

Most Users Ever Online: 1012

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Jim @ Moogento: 678

Steve Froggatt: 514

Badeth - UE: 513

Jimbob: 453

Paul Cartwright: 413

Forum Stats:

Groups: 6

Forums: 36

Topics: 5046

Posts: 26858

Administrators: Matthew Ogborne: 4564, Dave Furness: 4421, Rodney - UE: 338