RecurrencePattern Class
Recurrence pattern for a job schedule.
- Inheritance
-
azure.ai.ml.entities._mixins.RestTranslatableMixinRecurrencePattern
Constructor
RecurrencePattern(*, hours: int | List[int], minutes: int | List[int], week_days: str | List[str] | None = None, month_days: int | List[int] | None = None)
Keyword-Only Parameters
Name | Description |
---|---|
hours
|
The number of hours for the recurrence schedule pattern. |
minutes
|
The number of minutes for the recurrence schedule pattern. |
week_days
|
A list of days of the week for the recurrence schedule pattern. Acceptable values include: "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday" |
month_days
|
A list of days of the month for the recurrence schedule pattern. |
Examples
Configuring a JobSchedule to use a RecurrencePattern.
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)