JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle® ZFS Storage Appliance Administration Guide
Oracle Technology Network
Library
PDF
Print View
Feedback
search filter icon
search icon

Document Information

Using This Documentation

Chapter 1 Oracle ZFS Storage Appliance Overview

Chapter 2 Status

Chapter 3 Initial Configuration

Chapter 4 Network Configuration

Chapter 5 Storage Configuration

Chapter 6 Storage Area Network Configuration

Chapter 7 User Configuration

Chapter 8 Setting ZFSSA Preferences

Chapter 9 Alert Configuration

Chapter 10 Cluster Configuration

Chapter 11 ZFSSA Services

Chapter 12 Shares, Projects, and Schema

Chapter 13 Replication

Chapter 14 Shadow Migration

Chapter 15 CLI Scripting

Chapter 16 Maintenance Workflows

Using Workflows

Workflow Execution Context

Workflow Parameters

Constrained Parameters

Optional Parameters

Workflow Error Handling

Workflow Input validation

Workflow Execution Auditing

Workflow Execution Reporting

Versioning

Appliance Versioning

Workflow Versioning

Workflows as Alert Actions

Alert Action Execution Context

Auditing Slert Actions

Using Scheduled Workflows

Using the CLI

Coding the Schedule

Example: device type selection

BUI

CLI

Downloading workflows

Viewing workflows

Executing workflows

Chapter 17 Integration

Index

Coding the Schedule

Schedules can also be specified in the workflow code as a property in the Object workflow. The property syntax used here differs from the CLI schedule creation. Here three properties are used,

Table 16-11  Schedule Properties
Property
Type
Description
offset
Number
Determines the starting point in the defined period
period
Number
Defines the frequency of the Schedule
unit
String
Specifies if either seconds or month are used as unit in the offset and period definition

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 the period in the second schedule is set for a week, starting at the second day, at 4:30. Multiple schedules can be defined in the property schedules.

The Object MySchedules in the example uses the following three properties:

The starting point for weekly schedules is Thursday. This is due to the fact that the epoch is defined as starting on 1 Jan 1970 which was a Thursday.

In the above example the period in the second schedule uses a starting offset of 2 days + 4 hours + 30 minutes. This results in the starting date being January 3, 1970 at 4:30 am. The schedule recurs weekly indefinitely every Saturday at 4:30 am. Below you can see the display of the schedule in the CLI.

<small>dory:> maintenance workflows
dory:maintenance workflows> list
WORKFLOW     NAME                       OWNER SETID ORIGIN               VERSION
workflow-000 Configure for Oracle Solaris Cluster NFS root  false Oracle Corporation   1.0.0
workflow-001 Unconfigure Oracle Solaris Cluster NFS root  false Oracle Corporation   1.0.0
workflow-002 Configure for Oracle Enterprise Manager Monitoring root  false Sun Microsystems, Inc. 1.1
workflow-003 Unconfigure Oracle Enterprise Manager Monitoring root  false Sun Microsystems, Inc. 1.0</small>

dory:maintenance workflow-002 schedules>

NAME                 FREQUENCY            DAY                  HH:MM
schedule-000         halfhour             -                    --:00
schedule-001         week                 Saturday             04:30