Scheduler

Omniscope Scheduler

The Scheduler is an automation tool that comes bundled within the  Omniscope Enterprise Edition installer, which is the same as the free Viewer installer. The Scheduler is a graphical application requiring no special commands or development skills. The Scheduler allows you to define a number of highly-customisable tasks according to a recurring schedule. These tasks are typically related to refresh and manipulation/distribution of Omniscope or DataPlayer .SWF files. Scheduler tasks can also include more complex integration actions such as deploying a time-stamped file to a server or downloading and merging a .CSV file.

The Scheduler uses existing Omniscope files (empty or containing 'stale' versions of the data) as templates.  Template files should be configured as you want all future refreshed files to appear. The Scheduler manages future updates to these files from the defined data source(s) according to a defined time schedule. The Scheduler can also manage distribution of the refreshed files by email or FTP it to a website, or add timestamps (for example) as part of the Task List.

The Watch folder

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

Installation and requirements

The Scheduler installer is included in the installation file, but is a separate application found in the Visokio installation group folder accessed from the Windows Start button. The Scheduler is time-triggered, intended to be installed on a continuously-running Windows server (or any spare PC), and requires a user to be logged in to run. Please note:

Concepts/Definitions

To configure the Scheduler, the following concepts/definitions are required:
  • An .XML Action describes the work to be done.
  • A Task is an Action combined with a Schedule.
  • Any number of Tasks can be executed in sequence by the Scheduler according to each schedule
  • A Schedule comprises one or more Recurrences
    (e.g. "every 7 days, starting on {date}, ending on {date}").
Note: If you configure two tasks with the same time, or if a preceding task takes a long time, the second task will not start until the first task has finished.

Using the Scheduler

The Scheduler is a separate application that is started from the Windows Visokio Program Group. The Scheduler is not started from within Omniscope. You can have only one instance of the Scheduler running at a time. When you start the Scheduler, this small window is displayed, and after a short pause, the Scheduler window will appear:

 

 Scheduler log page URL: Click the "Scheduler log" link to see a web page (only available locally) listing the latest output of the Scheduler process. Use this log page to watch the Scheduler working away (hit refresh in your browser frequently). You can also use this log page to look for error/success messages.
Pause/Stop Commands: Use the Pause checkbox to freeze the Scheduler. No further tasks will be executed until you un-tick Pause. If a task is already executing, it will continue to finish. Click Stop to stop and close the Scheduler. This will abort any executing task mid-process.
Editing Task, Schedules & Settings:Click Edit tasks, schedules and settings to open the Scheduler configuration dialog. All changes you make in this dialog (and sub-dialogs) will not be committed or take effect until you click OK and return to the main Scheduler window.

 

Scheduler Configuration Dialogue

The tasks currently scheduled are displayed  like this:



  • Click Add to add a new task - this will prompt you to configure an action before showing the Task dialog
  • Select an existing task from the list and click Edit selected to edit it - this will show the Task dialog
  • Select an existing task from the list and click Remove to delete it

Starting with version 2.3, the Visokio Scheduler can be used in a "non-forked" mode enabling non-forked task execution. In the Scheduler settings dialog, "Fork scheduled execution", when un-ticked, allows scheduled tasks to execute in the same Java VM process as the Omniscope scheduling loop. This avoids the JVM startup time which can save over 10 seconds. Additionally, a timings option has been added to "chain action" and "file action" allowing you to analyse performance.

 

 

Configuring Scheduler Actions

Examples: Below we list a number of worked examples showing how to use the Scheduler for specific actions in downloadable .ZIP files:

Example 1: Live Publishing
Example 2: {more examples coming soon}

 

General Procedure- types of Scheduler actions:

  • File Action opens an .IOK /.IOM file and performs operations with it (e.g. Refresh from source).
  • Execute Command Action executes an operating system command
  • Resource Action copies, moves, uploads or downloads a file
  • Delete Action deletes a file or folder
  • Send Email Action sends an email, with optional attachment
  • Create Timestamp creates a to-the-second timestamp and performs operations using that text value
  • Chain action executes multiple actions with an on-fail action (e.g. open file, refresh, save copy; send email; delete file)

First choose the type of action. The most common action to use is File Action




 

Configuring a File Action

Choose the source file (for example, an .IOK file that you want to refresh and save), by clicking Choose.

Then add the other operations you want.

 

Scheduler Task Dialogue-Edit Task

The Edit Task dialogue is shown below:

 

 

In this example the Action is a Chain of actions action.

  • Click Edit to edit the existing action (in this case the "Chain of actions").
  • Click Change type to replace the action with a new action.

The Schedule section lists the recurrences configured. Here, one recurrence is defined: "every 15 minutes". You can configure multiple recurrences, such as "Every week starting 1 Feb 06" and "Every week starting 2 Feb 07", meaning every Wednesday and Thursday of the week. (See the Scheduler Recurrence dialogue below)

The Time out can be used to ensure hung tasks do not hang the scheduler. If a task takes longer than this period, it will be killed, allowing subsequent schedules of the same task or other tasks to continue. You may need to increase this if you are running very long and complex actions.

 

Scheduler Recurrence Dialogue

 

The Recurrence dialog allows you to specify a simple repetition according to a specified period of minutes, hours, or days, etc. If you want more complex schedules you must create multiple recurrences. For example, weekdays would be represented by 5 recurrences each beginning on a different weekday.

Logging- enabling in both Scheduler and Windows service  

Both the Visokio Windows service and the Scheduler have seperate configuration files that you need to modify to enable logging.

Scheduler

In order to enable logging for the Scheduler you need to add debugScheduler and debugSchedulerConfig properties to your config.xml. This file is usually located under c:\program files\visokio Omniscope\scheduler

Add the two properties mentioned above to the schedulerConfig tag as shown below in bold

...

<schedulerConfig port="24679" forkScheduledExecution="true" watchFolder="watch" watchPollingInterval="40" debugScheduler="true" debugSchedulerConfig="true">
...
 

Once you have done that restart the Scheduler in order for the new settings to take effect.

The log files are kept in the same folder as the config file. The log file is named log.txt

Windows service

In order to enable logging for the service you need to modify the wrapper.conf file located under c:\program files\visokio Omniscope\service

and then changing the wrapper.console.loglevel to either of the following options:

  • NONE - for no output.
  • FATAL - to only show fatal error messages.
  • ERROR  - to show all error messages.
  • STATUS - to show all state changes.
  • INFO  - shows all JVM output and informative messages.
  • DEBUG - shows detailed debug information.  
For example, if you wanted to change the log level to INFO you would do the following: wrapper.console.loglevel =INFO
Once you have done that restart the service for new changes to take effect. The log file for the service are kept in the same location as the wrapper.conf and is named wrapper.log