共用方式為


ComputeStartStopSchedule 類別

計算啟動或停止案例的排程。

繼承
azure.ai.ml.entities._mixins.RestTranslatableMixin
ComputeStartStopSchedule

建構函式

ComputeStartStopSchedule(*, trigger: CronTrigger | RecurrenceTrigger | None = None, action: ComputePowerAction | None = None, state: ScheduleStatus = ScheduleStatus.ENABLED, **kwargs: Any)

參數

名稱 Description
trigger
必要

排程的觸發程式。

action
必要

計算能力動作。

state
必要
<xref:azure.ai.ml.entities.ScheduleState>

排程的狀態。

kwargs
必要

其他組態參數的字典。

僅限關鍵字的參數

名稱 Description
trigger
必要
action
必要
state
預設值: ScheduleStatus.ENABLED

範例

建立 ComputeStartStopSchedule 物件。


   from azure.ai.ml.constants import TimeZone
   from azure.ai.ml.entities import ComputeSchedules, ComputeStartStopSchedule, CronTrigger

   start_stop = ComputeStartStopSchedule(
       trigger=CronTrigger(
           expression="15 10 * * 1",
           start_time="2022-03-10 10:15:00",
           end_time="2022-06-10 10:15:00",
           time_zone=TimeZone.PACIFIC_STANDARD_TIME,
       )
   )
   compute_schedules = ComputeSchedules(compute_start_stop=[start_stop])


屬性

provisioning_state

排程布建狀態。

傳回

類型 Description

排程布建狀態。

schedule_id

排程識別碼。

傳回

類型 Description

排程識別碼。