-
Task refresh index
On a server you would want the indexer to be run on a regular schedule. To do that you can uses the windows task runner. This document will show you how to create a batch file and schedule it to run on a fixed interval.
When creating batch files for the different tasks and server that should be run, I like so store them all in the C:\ProgramData\DataEase\DEPy3 folder. The reason for this is that they then will not be deleted if you reinstall or do a update of the software and library. And you then know where to look for them if you have a lot of them. You could add the exe files with parameters direct in the task scheduler, but my experience is that it can be hard to find errors or debug. The batch file can be run in a cmd prompt to test if it works before you add it to the task scheduler.
@echo start my.server.domain search indexer "C:\DEPy3\python.exe" "C:\path\to\my\data\scripts\demyindexer.py"
Example of a batch file starting a indexer. The indexer is just a python files doing the work using our libraries to read data from Prism and update the text indexer. You cold test it by simply running the script. If it works it should have created your index.
Next find the Task Scheduler and a select "Create Task..." at the side menu.
Give it a name that is easy to remember later. I always start the Python names with DEPy3_ and then just add what it is Ex. DEPy3_MyTaskindexer.
Then make sure you give the indexer the right it needs to run unattended, but changing to Run whether user is logged on or not and give it a user and password with right to read and write to the data base.
On Trigger tab add a new trigger, and select On a schedule and make sure you change it form default run once to what you want. Ex Daily at 17:00
On Action tab add a new action as Start a program and select your bat file.
That should be it, you can see if it runs by right click and select Run from the Task Scheduler Library. You should see a Last run time now and a next run time if all is correctly set up. If not you can edit and try again by right click and Property