Advanced Search

— Forum Scope —




— Match —





— Forum Options —





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

No permission to create posts
mail_open
Re-Index Cron Jobs
Avatar
Dale Holden
Member
April 26, 2014 - 5:39 pm
Member Since: October 24, 2013
Forum Posts: 290
sp_UserOfflineSmall Offline

Hi Matt

Cheers for that saves me tinkering and messing stuff up.

Have a good weekend.

Never become Co-Pilot of your own life!

Avatar
Jimbob
UK
Member
May 2, 2014 - 9:02 am
Member Since: November 15, 2013
Forum Posts: 453
sp_UserOfflineSmall Offline

Just followed the video guide to setup the cron jobs. Very easy to follow. Cheers Matt

Adventurist and online ecommerce retailer based in the UK. Trading since 2006.

Avatar
Matthew Ogborne

Founder
May 2, 2014 - 3:33 pm
Member Since: July 18, 2013
Forum Posts: 4565
sp_UserOfflineSmall Offline

Jimbob said

Just followed the video guide to setup the cron jobs. Very easy to follow. Cheers Matt

Howdy James & Dale,

Ace, I’m glad the video helped you both :)

Matt

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

Ultimo Magento Theme

sean1167

New
August 26, 2014 - 11:55 am
Member Since: August 19, 2014
Forum Posts: 1
sp_UserOfflineSmall Offline

Matt & Dave –

First, you guys ROCK !

Second, is it possible you can do a video on the “reindexall” function with all the switches that are available ?
I ran the php script last night and got this …….
Product Attributes index was rebuilt successfully
Product Prices index was rebuilt successfully
Catalog URL Rewrites index was rebuilt successfully
Product Flat Data index was rebuilt successfully
Category Flat Data index was rebuilt successfully
Category Products index was rebuilt successfully
Catalog Search Index index was rebuilt successfully
Stock Status index was rebuilt successfully
Tag Aggregation Data index was rebuilt successfully.

My question is, did the script completed all the indexing ?

I am generally looking for some type of finality with any script that says everything executed that
way it was intended and “the end” .

Avatar
Dave Furness

Founder
August 27, 2014 - 3:53 pm
Member Since: July 19, 2013
Forum Posts: 4606
sp_UserOfflineSmall Offline

Hey Sean,

Welcome to the forums and thanks for your kind words :)

When it comes to reindexing, we don’t have a dedicated guide to this but in the guides where it is necessary we do show you us doing this.

It is exactly as you have described above, we don’t see a ‘The end’ of sorts. We just have the green bars once it has finished :)

Dave

Every expert was once a beginner

nickfessi

Excellent
October 25, 2014 - 2:26 pm
Member Since: August 12, 2014
Forum Posts: 55
sp_UserOfflineSmall Offline

Can I use this method to clear the chaches every night too? Every morning i have to do them manually and if so what is the syntax for the cron job?

JonBoy

Excellent
October 27, 2014 - 1:47 pm
Member Since: February 23, 2014
Forum Posts: 42
sp_UserOfflineSmall Offline

nickfessi said

Can I use this method to clear the chaches every night too? Every morning i have to do them manually and if so what is the syntax for the cron job?

I have this setup on my cron to automatically re-index all during the night.

/usr/local/lsws/fcgi-bin/lsphp5 /home/******/public_html/shell/indexer.php –reindexall > /dev/null 2>&1

Replace ****** with what you have after /home/ in file manager, hope this helps you. Works for me and saves me manually re-indexing every morning.

Avatar
Matthew Ogborne

Founder
October 27, 2014 - 2:05 pm
Member Since: July 18, 2013
Forum Posts: 4565
sp_UserOfflineSmall Offline

Howdy,

See the video below for the easy way of finding out what the cron path is and what you need to add as a cron job.

And the file download is here https://understandinge.com/forum/all-things-coding/re-index-cron-jobs/#p2397

As for the clearing of caches, no idea! Will have a look right now though.

Matt

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

Ultimo Magento Theme

Avatar
Matthew Ogborne

Founder
October 27, 2014 - 2:09 pm
Member Since: July 18, 2013
Forum Posts: 4565
sp_UserOfflineSmall Offline

nickfessi said

Can I use this method to clear the chaches every night too? Every morning i have to do them manually and if so what is the syntax for the cron job?

Howdy Nick,

See here https://github.com/akira28/magento-utils/blob/master/shell/cleanCache.php

Some brief instructions are:

1. Go here https://github.com/akira28/magento-utils/blob/master/shell/cleanCache.php
2. Click the button called “Raw”
3. Copy all the code
4. Via FTP create a file called “clearcaches.php”
5. Paste that into it and press save
6. Set a cron job up to run that script each morning, say at 05:05

Matt

The following users say thank you to Matthew Ogborne for this useful post:

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

Ultimo Magento Theme

JonBoy

Excellent
October 27, 2014 - 3:44 pm
Member Since: February 23, 2014
Forum Posts: 42
sp_UserOfflineSmall Offline

That is an awesome idea using cron to refresh caches, just followed steps above, setup cron, tested and working a treat.

nickfessi

Excellent
October 27, 2014 - 4:59 pm
Member Since: August 12, 2014
Forum Posts: 55
sp_UserOfflineSmall Offline

Thanks for the help Matt. I will get onto it right away and let you know how i get on :)

Avatar
Dave Furness

Founder
October 28, 2014 - 12:36 am
Member Since: July 19, 2013
Forum Posts: 4606
sp_UserOfflineSmall Offline

Happy Days Guys!

Yea please let us know how you get on Nick :)

Dave

Every expert was once a beginner

nickfessi

Excellent
October 28, 2014 - 8:27 am
Member Since: August 12, 2014
Forum Posts: 55
sp_UserOfflineSmall Offline

Hi,

I have only just got chance to set this up.

Call me stupid, but what is the syntax for adding this cron job? Is it:

/usr/local/lsws/fcgi-bin/lsphp5 /home/******/public_html/shell/cleacaches.php ?

Avatar
Matthew Ogborne

Founder
October 28, 2014 - 9:37 am
Member Since: July 18, 2013
Forum Posts: 4565
sp_UserOfflineSmall Offline

Hi Nick,

How did I know that question would come up? Because everyone knows their servers root path off the top of their heads right?

NOT! :)

Download the file in this forum post https://understandinge.com/forum/all-things-coding/re-index-cron-jobs/#p2397 and upload to your Magento websites folder.

Then navigate to yourdomain.com/pathchecker.php and you’ll have the path you need.

Obviously where it says “cron.php” change this to “clearcaches.php” and use that as your cron path.

Matt

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

Ultimo Magento Theme

JonBoy

Excellent
October 28, 2014 - 9:51 am
Member Since: February 23, 2014
Forum Posts: 42
sp_UserOfflineSmall Offline

You might need to add this to your path Nick, I found it didn’t execute on my tests until I added an option at the end.

clearcaches.php –all

There is list of options at bottom of the code Matt posted.

nickfessi

Excellent
October 28, 2014 - 9:58 am
Member Since: August 12, 2014
Forum Posts: 55
sp_UserOfflineSmall Offline

I get all the pathchecker stuff, it was just what came after the file name. with the indexing it looked like options, but you’ve cleared that up now with the –all

nykkooo

Excellent
November 6, 2014 - 2:58 pm
Member Since: July 10, 2014
Forum Posts: 64
sp_UserOfflineSmall Offline

Matthew Ogborne said

Hi Dale,

Leave them in, you need the Magento cron running for numerous other tasks, M2E Pro have just worked around the challange of the cron being required to be setup, you want the cron running for newsletters, log clearing etc…

Matt

Decided to put this question here as it is related. I followed your guide from above and now have automatic re-indexing . All was running fine until two days ago , when one of the idexexes : Catalogue URL Rewrittes sort of stuck or is processing too long. I found that because when I was trying to delete several products from backend manually I got this error several times : General error: 1205 Lock wait timeout exceeded; try restarting transaction . I goggled it and I am now thinking the problem is when this index is running I am not able to do nothing from backend and because it is either stuck or running for ages at a time I can;t udapte/delete product details from backend. Please suggest a solution.
RE:My automatic reindexing is running once an hour for the past month o two and all was Ok until now.

thanks

Avatar
Matthew Ogborne

Founder
November 6, 2014 - 9:03 pm
Member Since: July 18, 2013
Forum Posts: 4565
sp_UserOfflineSmall Offline

Howdy nykkooo,

If the process is locked because it’s running, it’s running. So the only sensible suggestion is to not to run it every hour.

Matt

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

Ultimo Magento Theme

nykkooo

Excellent
November 8, 2014 - 8:49 pm
Member Since: July 10, 2014
Forum Posts: 64
sp_UserOfflineSmall Offline

Matthew Ogborne said

Howdy nykkooo,

If the process is locked because it’s running, it’s running. So the only sensible suggestion is to not to run it every hour.

Matt

Any clue why it is running so long and it wasn’t doing this several days ago ? Maybe you know some tricks / tools how to check that

Dimitri
Member
January 3, 2015 - 3:11 pm
Member Since: November 26, 2013
Forum Posts: 110
sp_UserOfflineSmall Offline

Hi guys,

Matthew Ogborne said

Some brief instructions are:

1. Go here https://github.com/akira28/magento-utils/blob/master/shell/cleanCache.php
2. Click the button called “Raw”
3. Copy all the code
4. Via FTP create a file called “clearcaches.php”
5. Paste that into it and press save
6. Set a cron job up to run that script each morning, say at 05:05

Matt

Will this method also refresh all cache types on the list or just flush caches?

No permission to create posts

 

Why Should You Join UnderstandingE?

 
  • Access to over 500 step-by-step video tutorials
  • +20 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:
39 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Jim @ Moogento: 688

Steve Froggatt: 514

Badeth - UE: 513

Jimbob: 453

Paul Cartwright: 414

Forum Stats:

Groups: 6

Forums: 37

Topics: 5221

Posts: 27486

Administrators: Matthew Ogborne: 4565, Dave Furness: 4606