Business Case

About MiMTiD Corp.

MiMTiD Corp. acts as Content Protection Agent for some of the world's leading Motion Picture, Record and Sports Programming companies in the United States. On a monthly basis, MiMTiD submits thousands of take down...

White paper

OpenSearchServer is a comprehensive suite of software tools and an applications server. With these, you can develop index-related applications with full text capabilities.

When we were creating OpenSearchServer, we wanted to make an...

OpenSearchServer Community Edition Features List

Share

Scheduler module

In an OpenSearchServer application you may have several tasks that you need to run many times. For example, you may want to periodically duplicate your index on another OpenSearchServer instance.

We have integrated a Scheduler into our solution, in order to make it easier to perform these kinds of periodic tasks.

The Scheduler will allow you to schedule tasks that are to be launched and stopped automatically, with no need for you to be present when they are running. Also it will send you an e-mail each time it runs a process, indicating that the process has been run successfully.

OpenSearchServer Scheduler is based on Quartz and uses the same syntax as the Linux Cron program.

Tasks that can be created in the Scheduler module are:

  • Run the Database Crawler
  • Start / stop the Web Crawler
  • Start / stop the File Crawler
  • Optimize an index
  • Replicate an index

Using the Scheduler

In order to access the Scheduler module, you just have to go to the Scheduler tab in OpenSearchServer, after first selecting an index.

Then you tick the “Active” box in order to enable (and later disable) this module and then you choose a name for your set of parameters.

You are now ready to add tasks and define when you wish them to be launched.

Creating a job

When you are on the Scheduler tab, click on the sub-tab panel called “New/Edit”.

To define a job you will have to enter the following:

  • A unique name, (and then you tick a box to enable or disable that name),
  • A cron expression to schedule execution (start and stop times, frequency, etc.),
  • A list of tasks to be performed by that job.
The cron expression

In order to make scheduling as simple as possible, we have used the same syntax as Cron, the well-known Linux application. Cron is not only very powerful but also very flexible and it will make your OpenSearchServer applications more professional and efficient.

The cron expression syntax is fully described at
http://en.wikipedia.org/wiki/CRON_expression#CRON_expression

Tasks controlled by the Scheduler

The tasks that you can set up in the Scheduler are displayed in the “Task” menu when you create a job, as shown below.

  • Database crawler – run: Execute a database SQL query to populate the index, as defined in the database crawler module.
  • File crawler – start/stop: Start or stop the indexation of the file system, as defined in the file crawler module.
  • Web crawler – start/stop: Start or stop the web crawler, as defined in the web crawler module.
  • Index – optimize: Execute index optimization.
  • Replication - run: Copy the index to another OpenSearchServer instance, as defined in the Replication module.
  • Monitoring execution of the Scheduler

The sub-tab called Log lists all the tasks previously run, and shows the date when they were executed and the duration of the execution.