RecurrenceTrigger Class

Recurrence trigger for a job schedule.

Inheritance
azure.ai.ml.entities._schedule.trigger.TriggerBase
RecurrenceTrigger

Constructor

RecurrenceTrigger(*, frequency: str, interval: int, schedule: RecurrencePattern | None = None, start_time: str | datetime | None = None, end_time: str | datetime | None = None, time_zone: str | TimeZone = TimeZone.UTC)

Keyword-Only Parameters

Name Description
start_time

Specifies the start time of the schedule in ISO 8601 format.

end_time

Specifies the end time of the schedule in ISO 8601 format. Note that end_time is not supported for compute schedules.

time_zone

The time zone where the schedule will run. Defaults to UTC(+00:00). Note that this applies to the start_time and end_time.

Default value: TimeZone.UTC
frequency

Specifies the frequency that the schedule should be triggered with. Possible values include: "minute", "hour", "day", "week", "month".

interval
int

Specifies the interval in conjunction with the frequency that the schedule should be triggered with.

schedule

Specifies the recurrence pattern.

Examples

Configuring a JobSchedule to trigger recurrence every 4 weeks.


   from azure.ai.ml import load_job
   from azure.ai.ml.entities import JobSchedule, RecurrencePattern, RecurrenceTrigger

   pipeline_job = load_job("./sdk/ml/azure-ai-ml/tests/test_configs/command_job/command_job_test_local_env.yml")
   trigger = RecurrenceTrigger(
       frequency="week",
       interval=4,
       schedule=RecurrencePattern(hours=10, minutes=15, week_days=["Monday", "Tuesday"]),
       start_time="2023-03-10",
   )
   job_schedule = JobSchedule(name="simple_sdk_create_schedule", trigger=trigger, create_job=pipeline_job)