Using a Scheduled Workflow

Once a workflow that contains the scheduled: true property is loaded onto an Oracle ZFS Storage Appliance system, the schedule can be defined or modified via the CLI interface. See the scheduled property in the example for "Using Workflow Properties" in Coding Workflow Schedules.

Each schedule entry consists of the following properties:

Table 9-12 Workflow Schedule Properties

Property Type Description

NAME

String

Name of the schedule. This value is system generated.

frequency

String

Values can be minute, halfhour, hour, day, week, month.

day

String

Values can be Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, or Sunday. This value can be set only when frequency is set to week or month.

hour

String

Values can be 00, 01,…, 23. This value can be set only when frequency is set to day, week, or month.

minute

String

00, 01,…, 59. This value can be set only when hour is set.

Example 9-15 Scheduled Workflow in the CLI

This example shows how to add two execution times to a workflow named "My Scheduled Workflow". The first execution time is daily at 10:05 a.m. The second scheduled execution time for this workflow is each Monday at 1:15 p.m.

hostname:> maintenance workflows
hostname:maintenance workflows> select name="My Scheduled Workflow"
hostname:maintenance workflow-002> schedules
hostname:maintenance workflow-002 schedules> create
hostname:maintenance workflow-002 schedule (uncommitted)> set frequency=day
                    frequency = day (uncommitted)
hostname:maintenance workflow-002 schedule (uncommitted)> set hour=10
                         hour = 10 (uncommitted)
hostname:maintenance workflow-002 schedule (uncommitted)> set minute=05
                       minute = 05 (uncommitted)
hostname:maintenance workflow-002 schedule (uncommitted)> commit
hostname:maintenance workflow-002 schedules> list
NAME                 FREQUENCY            DAY                  HH:MM
schedule-001         day                  -                    10:05
hostname:maintenance workflow-002 schedules> create
hostname:maintenance workflow-002 schedule (uncommitted)> set frequency=week
                    frequency = week (uncommitted)
hostname:maintenance workflow-002 schedule (uncommitted)> set day=Monday
                           day = Monday (uncommitted)
hostname:maintenance workflow-002 schedule (uncommitted)> set hour=13
                          hour = 13 (uncommitted)
hostname:maintenance workflow-002 schedule (uncommitted)> set minute=15
                       minute = 15 (uncommitted)
hostname:maintenance workflow-002 schedule (uncommitted)> commit
hostname:maintenance workflow-002 schedules> list
NAME                 FREQUENCY            DAY                  HH:MM
schedule-001         day                  -                    10:05
schedule-002         week                 Monday               13:15
hostname:maintenance workflow-002 schedules>