Geek Out: Scheduled Indexing of Your Concrete5 via Cron

I thought I would share how to get the automatic indexing working in a Concrete5 site, if you happen to use that CMS. There is a special URL in the admin dashboard, which you can call from cron, to periodically re-index your site.

How to get Concrete5 to Automatically Index in One Easy Step

This is what the cron entry should look like:

27 * * * * /usr/bin/wget -O - -q -t 1

This runs the job every hour at 27 minutes past. You should also be able to use other programs to hit the URL if wget is not installed, such as lynx or curl:

27 * * * * /path/to/lynx -source
27 * * * * /path/to/curl --silent --compressed

Make sure you use absolute paths in a crontab file, because cron’s system environment is not the same as that of a shell. It is more limited. Also, of course the way you enter cron jobs will be different per host, and some may allow you to do it via a control panel such as cpanel. Either way, if you do not know how, you can ask your hosting company. This is a typical and easy thing to set up, if you provide them with your Concrete5 installation’s special index URLs from the Concrete5 dashboard.

If this helped you, please let me know in the comments or in a blog post of your own. Enjoy!