Watch folder

Using the Scheduler 'watch folder' feature

The 'watch folder' function allows you to execute an XML Action from an external trigger (i.e. programmatically). It is an alternative to configuring scheduled tasks manually using the Scheduler user interface, or running tasks programmatically by creating a new Java process. Creating a new Java process to execute an XML action (as described in XML Actions) has an overhead of approximately 10 seconds which is avoided when using the 'watch folder'.

 

The Omniscope Scheduler includes other processes as well as the scheduling loop. One of these is a process which watches a folder (the 'watch folder') continuously while the Scheduler is running. Any XML Action files dropped into this folder are removed and executed immediately.

 

The Scheduler process can be started from Start menu >All Programs >Visokio Omniscope> You can also configure the Scheduler to run as a Windows service.

 

Please note: the Scheduler must be running for the watch folder to work.

Instructions

Create an XML Action file, extension ".xml", as described in XML Actions. You can either create this using the Omniscope user interface, or programmatically (using the Omniscope user interface to create a sample XML file, then modifying the resulting file to suit).

 

To execute an XML Action file on demand, copy it into the watch folder, found in "scheduler\watch" within the Omniscope installation folder, typically:

 

C:\Program Files\Visokio Omniscope\scheduler\watch

If the Scheduler is running, this file will immediately be executed then deleted. After testing, refer to the Scheduler log to check for errors:

 

http://localhost:24679/

 

If you are repeatedly testing changes to an XML Actions file, be careful to copy (and not move) the XML Actions file to the watch folder, because it willl be automatically deleted after being executed. Also be sure to refresh the web browser showing the log frequently to check for errors.

 

Note: files dropped into the watch folder are executed in sequence and in no specific order, using the same JVM as the Scheduler. It is not currently possible to execute multiple tasks in parallel.