将包含 scheduled: true 属性的工作流加载到设备中后,可以通过 CLI 界面定义或修改调度表。请参见编码工作流调度表中示例 22, 使用工作流属性中的 scheduled 属性。
每个调度表条目都由以下属性组成:
|
此示例显示如何将两个执行时间添加到名为 "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>