Scheduler

Omniscope Scheduler

The Scheduler is an automation tool that comes bundled within the Omniscope Enterprise Server Edition installer (which is the same as the free Viewer installer) and must be activated with an Enterprise key. The Scheduler is a separate mouse-driven application requiring no special commands or development skills. The Scheduler allows business users with access to the 24/7 server to define a number of highly-customisable file operations according to a recurring schedule. The defined repeated operations are typically related to refresh and manipulation/distribution of Omniscope or DataPlayer .SWF files but can involve other file types, like Excel  and printed static PDF and PowerPoint as well. Scheduler tasks can also include more complex integration actions such as archiving time-stamped 'snapshot' files to a server, delivering files via e-mail or FTP or downloading and merging a .CSV file from a remote source.

The Scheduler uses existing Omniscope IOK files (stored 'empty' or containing 'stale' versions of the data to be refreshed from source) as templates. Template IOK files are configured in desktop Omniscopes and saved as the file owner wants 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 them 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 chronological scheduling loop. One of these other processes is a separate 'watch folder' process. This process watches a user-created folder called 'watch' continuously while the Scheduler is running. Any .XML Actions files dropped into this folder are removed and executed immediately. This allows outside software processes to drive Omniscope refresh publish and distribute file operations via XML formatted text files generated on demand and saved into the Watch folder. More information

Installation and requirements

The Scheduler installer is included in the free Viewer  installation file, but on the desktop 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 check-box 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 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 Time-stamp creates a to-the-second time-stamp 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  


To enable logging in either the Scheduler or the Windows service you need to edit the config.xml which is configured using the Scheduler desktop application. Note if you enable the debugging it will take effect for both the Scheduler and the Windows Service (if you have the service configured and running).


How to enable Scheduler/Windows service logging


Start the scheduler application from Start > All program, click "Editing Task, Schedules & Settings" and enable "Log Debug" and/or "Log Detail" to get more detailed logging relating to tasks being processed. Note that "Log Debug" option is used in exceptional circumstances, in most cases "Log Detail" should be sufficient. Once you have configured the settings click "Save and apply", these changes will be saved to config.xml. If you are running as a Windows service you will need to restart the Visokio Enterprise service in order for new changes to take effect. The log files are kept in the same folder as the config file (log.txt).


Windows service initialisation logging

In addtion to the Scheduler logging options above, the Windows service provides an additional logging configuration. This additional logging is helpful when you want to get more information if you are having problems with running as a service. To enable Windows Service logging modify the wrapper.conf file located in service folder in the Visokio Omniscope installation directory 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