Go to main content

Oracle® ZFS Storage Appliance 管理指南,发行版 OS8.8.x

退出打印视图

更新时间: 2021 年 8 月
 
 

使用调度的工作流

将包含 scheduled: true 属性的工作流加载到设备中后,可以通过 CLI 界面定义或修改调度表。请参见编码工作流调度表中示例 22, 使用工作流属性中的 scheduled 属性。

每个调度表条目都由以下属性组成:

表 162  工作流调度表属性
属性
类型
说明
NAME
字符串
调度表的名称。此值是系统生成的。
frequency
字符串
值可以是分钟、半小时、小时、天、周、月
day
字符串
值可以是星期一、星期二、星期三、星期四、星期五、星期六或星期日。仅当 frequency 设置为 week 或 month 时,才能设置此值。
hour
字符串
值可以是 00、01、…、23。仅当 frequency 设置为 day、week 或 month 时,才能设置此值。
minute
字符串
00、01、…、59。仅当设置 hour 时,才能设置此值。
示例 21  CLI 中调度的工作流

此示例显示如何将两个执行时间添加到名为 "My Scheduled Workflow" 的工作流。第一个执行时间是每天上午 10:05。此工作流的第二个调度执行时间为每星期一下午 1:15。

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>