ComputeStartStopSchedule Class

Schedules for compute start or stop scenario.

Inheritance
azure.ai.ml.entities._mixins.RestTranslatableMixin
ComputeStartStopSchedule

Constructor

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

Parameters

Name Description
trigger
Required

The trigger of the schedule.

action
Required

The compute power action.

state
Required
<xref:azure.ai.ml.entities.ScheduleState>

The state of the schedule.

kwargs
Required

A dictionary of additional configuration parameters.

Keyword-Only Parameters

Name Description
trigger
Required
action
Required
state
Default value: ScheduleStatus.ENABLED

Examples

Creating a ComputeStartStopSchedule object.


   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])


Attributes

provisioning_state

The schedule provisioning state.

Returns

Type Description

The schedule provisioning state.

schedule_id

The schedule ID.

Returns

Type Description

The schedule ID.