Advertisement

Can Smart Search Indexer be set to run via a cron job?

Discussion regarding Joomla! 5.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
EmilyB
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 119
Joined: Sun Jan 10, 2010 4:52 pm

Can Smart Search Indexer be set to run via a cron job?

Post by EmilyB » Sat Oct 19, 2024 3:14 pm

Hi,

I want to run the smart search indexer nightly to keep search results up to date etc. Is it possible to run a cron job to achieve this?

I have tried:

/usr/bin/wget -O /dev/null "https://mysite.com/index.php?option=com ... ndex.index" > /dev/null 2>&1

And also:

/usr/bin/php /mysite/httpdocs/cli/joomla.php finder:index

I can't find any guidence on how to do this that works on my site.

Any help would be greatly appreciated, also any suggestions on how many times it should be run for optimum performance.

Kind regards

Advertisement
SharkyKZ
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3103
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Can Smart Search Indexer be set to run via a cron job?

Post by SharkyKZ » Sat Oct 19, 2024 4:29 pm

finder:index command is correct. Did it not work for you?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31396
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Can Smart Search Indexer be set to run via a cron job?

Post by Per Yngve Berg » Sat Oct 19, 2024 5:03 pm


EmilyB
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 119
Joined: Sun Jan 10, 2010 4:52 pm

Re: Can Smart Search Indexer be set to run via a cron job?

Post by EmilyB » Sat Oct 19, 2024 5:22 pm

Hi,

many thanks to both of you for your help. I am just trying the finder:index again. Should it be the website url like this:

/usr/bin/php /var/www/mysitename.com/httpdocs/cli/joomla.php finder:index > /dev/null 2>&1

Or like this:

/usr/bin/php /var/www/mysitename/httpdocs/cli/joomla.php finder:index > /dev/null 2>&1

Also, how regular should it be run on a site with multiple components that use it? I have easysocial, easyblog and numerous other components that rely on it.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31396
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Can Smart Search Indexer be set to run via a cron job?

Post by Per Yngve Berg » Sat Oct 19, 2024 7:21 pm

You have to run the php command

Code: Select all

/usr/local/bin/php /home/username/public_html/[optional subfolder]/cli/joomla.php

EmilyB
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 119
Joined: Sun Jan 10, 2010 4:52 pm

Re: Can Smart Search Indexer be set to run via a cron job?

Post by EmilyB » Sun Oct 20, 2024 9:12 am

Hi,

thanks for replying. I tried this based on your suggestion but it still didn't run:

/usr/local/bin/php /home/mysite/public_html/cli/joomla.php finder:index > /dev/null 2>&1

It does run if I paste the following in the browser:

https://www.mysite.com/administrator/in ... =component

Does that mean anything?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31396
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Can Smart Search Indexer be set to run via a cron job?

Post by Per Yngve Berg » Sun Oct 20, 2024 10:12 am

1) Is the Path to the PHP Command correct?

2) Is the Path to the Joomla Installation correct?

what happens when you type php at the terminal?

Advertisement

Post Reply

Return to “Performance - Joomla! 5.x”