PDA

View Full Version : Chrontab to run Search indexer?


MSteenberg
05-05-2001, 10:00 PM
Not having used the Chrontab feature of the Control Panel before, I am wondering if it is the right tool to be used to set up a daily running of a CGI script that indexes my search engine.

I have a script stored in a subdirectory of my primary cgi-bin directory, which indexes the sight for the search engine. At present, I run this manually (via a telnet/SSH session) after any major updates/additions to the sight; however, I would like to be able to have the indexer script run automatically every midnight or so, such that it automatically takes into account any changes I might make.

Is this something that the Chrontab could be used for? Again, I have never before used it on this server, and can't seem to find any documentation in the Knowledge Base (if some is there, I could of course appreciate a pointer to it!).

Many thanks for help from any who might know of an answer.

Sincerely,
Matthew

Damian
05-05-2001, 10:21 PM
A quick crontab tutorial is at www.codingclick.com (petesmc's website) but I don't know how to make it run the indexer...unless, of course, the indexer is run thru common unix commands...that may do the trick :)

WackyMan

ajc
05-11-2001, 11:59 AM
I use ksearch on my site and have setup crontab to index it everyday at midnight. As long as your script can be run from the root then it should work. just put the full path to the script into crontab and set the flags to run everyday at midnight. The text on the cpanel give an indication as to what these should be.

Drop me an email if you have any problems.

Allen

MSteenberg
05-11-2001, 12:03 PM
Allen, thanks so much for this post. It hits right on the mark, as the search engine I am currently employing is my own highly modified form of the KSearch system - so if you are successfully running the indexer.pl via the chrontab, I should have no problems with it myself.

Many thanks for the comment.

Matthew

ajc
05-11-2001, 07:24 PM
Just one point. I did need to make an adjustment to the indexer.pl file to ensure that the configuration file could be found. I had to put the full path to this file, otherwise it can't be found when crontab runs it from the root directory.

You can test that it will work by trying to run it yourself in an SSH session from your root directory (instead of going into the ksearch directory).

Good luck.

Allen

MSteenberg
08-09-2001, 01:10 PM
Does anyone know whether chrontab, as set up through the HR Control Panel, reports errors if they are encountered while it is running a script at a given time? Are such errors reported via an email message, or some area in the Control Panel?

Thankfully,
Matthew Steenberg