Metamerge logo
Search

Advanced Search
*
*
*
* HOME DOCUMENTS & RESOURCES DOWNLOADS EARLY TECH ACCESS SUPPORT FAQ KNOWN ISSUES OLD VERSIONS
*

 

Timer EventHandler

Note:

In versions prior to 4.6.5, this EventHandler was called Cronjob. From 4.6.5 it is also available as Timer.  There are no differences between these, but you are encouraged to use Timer as Cronjob might not be available in future releases.

Overview

The timer waits for a specified time at which point it executes a script or starts an AssemblyLine. The script must be provided by the administrator/user.

Example

A demo package containing a ready to run MI configuration for the Timer EventHandler can be found  here

Configuration

This handler needs the following parameters:

Parameter

Description

class com.architech.trigger.rstTimer
schedule This parameter decides when the EventHandler is executed. The format  is "cron" style and is specified as follows:

<month> <day> <weekday> <hour> <minute>

The fields have numeric values:
Month = 0 - 11 (January .. December)
Day = 1 - 31
Weekday = 1 - 7 (Sunday .. Saturday)
Hour = 0 - 23
Minute = 0 - 59

Fields are separated by white space. Enter "*" to specify any value. You may specify multiple values for any field, separated by commas, but the values should be in ascending order.

When the current time matches all the fields in the schedule, the specified AssemblyLine is run.

Samples:
* * 5 22 0 - Run every Thursday at 22:00 hours
* 3 * 22 0 - Run every 3rd of each month at 22:00 hours

Note: The month field has values from 0 to 11, while day and weekday values begin at 1.

Note: A common source of confusion is specifying both a day and a weekday. Both attributes must match, meaning that this event will not occur often.

AssemblyLine The AssemblyLine to start.
script If specified, the script must contain a function called ontimer. This function is called with no parameters whenever the time specified by the schedule parameter is reached, and then the AssemblyLine is started. The schedule of the EventHandler can be modified through the timer object. You reconfigure the timer on the fly by setting the schedule parameter from the ontimer function. I.e.:

function ontimer()
{
     timer.setParam ("schedule", "* * * 22 0");
}

scriptEngine Script engine for the script (i.e. javascript, vbscript etc..)

 

 

 

*
  Metamerge Integrator version 4.6 ©Copyright Metamerge AS 2000-2002 Last edited 2002-06-10 contact us