Oracle ZFS Storage Appliance Administration Manual page 602

Hide thumbs Also See for ZFS Storage Appliance:
Table of Contents

Advertisement

Coding Workflow Schedules
TABLE 135
Property
offset
period
unit
EXAMPLE 29
The following code example illustrates the use of the properties. Note that inline arithmetic
helps to make the offset and period declarations more readable.
// Example of using Schedule definitions within a workflow
var MyTextObject = {
MyVersion: '1.0',
MyName: 'Example 9',
MyDescription: 'Example of use of Timer',
Origin: 'Oracle'
};
var MySchedules = [
// half hr interval
{ offset: 0, period: 1800, units: "seconds" },
// offset 2 days, 4hr, 30min , week interval
{offset: 2*24*60*60+4*60*60+30*60, period: 604800,units: "seconds" }
];
var workflow = {
name: MyTextObject.MyName,
description: MyTextObject.MyDescription,
version: MyTextObject.MyVersion,
alert: false,
setid: true,
schedules: MySchedules,
scheduled: true,
origin: MyTextObject.Origin,
execute: function () {
audit('workflow started for timer; ');
}
}
};
The property units in the Object MySchedules specifies the type of units used for the properties
offset and period. They can be set to either seconds or month. The property period specifies the
frequency of the event and the offset specifies the units within the period. In the above example
602
Oracle ZFS Storage Appliance Administration Guide, Release OS8.6.x • September 2016
Workflow Schedule Properties
Type
Number
Number
String
Illustrating the Use of Workflow Properties
Description
Determines the starting point in the
defined period
Defines the frequency of the
Schedule
Specifies if either seconds or month
are used as unit in the offset and
period definition

Advertisement

Table of Contents
loading

Table of Contents