1.16.32
flytekit.core.schedule
These classes provide functionality related to schedules.
Directory
Classes
| Class | Description |
|---|---|
CronSchedule |
Use this when you have a launch plan that you want to run on a cron expression. |
FixedRate |
Use this class to schedule a fixed-rate interval for a launch plan. |
OnSchedule |
Protocols
| Protocol | Description |
|---|---|
LaunchPlanTriggerBase |
flytekit.core.schedule.CronSchedule
Use this when you have a launch plan that you want to run on a cron expression.
This uses standard cron format
in case where you are using default native scheduler using the schedule attribute.
CronSchedule(
schedule="*/1 * * * *", # Following schedule runs every min
)See the User Guide for further examples.
Parameters
class CronSchedule(
cron_expression: typing.Optional[str] = None,
schedule: typing.Optional[str] = None,
offset: typing.Optional[str] = None,
kickoff_time_input_arg: typing.Optional[str] = None,
)| Parameter | Type | Description |
|---|---|---|
cron_expression |
typing.Optional[str] |
|
schedule |
typing.Optional[str] |
|
offset |
typing.Optional[str] |
|
kickoff_time_input_arg |
typing.Optional[str] |
Properties
| Property | Type | Description |
|---|---|---|
cron_expression |
None |
|
cron_schedule |
None |
|
is_empty |
None |
|
kickoff_time_input_arg |
None |
|
rate |
None |
|
schedule_expression |
None |
Methods
| Method | Description |
|---|---|
from_flyte_idl() |
|
serialize_to_string() |
|
short_string() |
|
to_flyte_idl() |
from_flyte_idl()
def from_flyte_idl(
pb2_object,
)| Parameter | Type | Description |
|---|---|---|
pb2_object |
Returns: Schedule
serialize_to_string()
def serialize_to_string()short_string()
def short_string()Returns: Text
to_flyte_idl()
def to_flyte_idl()Returns: flyteidl.admin.schedule_pb2.Schedule
flytekit.core.schedule.FixedRate
Use this class to schedule a fixed-rate interval for a launch plan.
from datetime import timedelta
FixedRate(duration=timedelta(minutes=10))See the fixed rate intervals chapter in the cookbook for additional usage examples.
Parameters
class FixedRate(
duration: datetime.timedelta,
kickoff_time_input_arg: typing.Optional[str] = None,
)| Parameter | Type | Description |
|---|---|---|
duration |
datetime.timedelta |
|
kickoff_time_input_arg |
typing.Optional[str] |
Properties
| Property | Type | Description |
|---|---|---|
cron_expression |
None |
|
cron_schedule |
None |
|
is_empty |
None |
|
kickoff_time_input_arg |
None |
|
rate |
None |
|
schedule_expression |
None |
Methods
| Method | Description |
|---|---|
from_flyte_idl() |
|
serialize_to_string() |
|
short_string() |
|
to_flyte_idl() |
from_flyte_idl()
def from_flyte_idl(
pb2_object,
)| Parameter | Type | Description |
|---|---|---|
pb2_object |
Returns: Schedule
serialize_to_string()
def serialize_to_string()short_string()
def short_string()Returns: Text
to_flyte_idl()
def to_flyte_idl()Returns: flyteidl.admin.schedule_pb2.Schedule
flytekit.core.schedule.LaunchPlanTriggerBase
protocol LaunchPlanTriggerBase()Methods
| Method | Description |
|---|---|
to_flyte_idl() |
to_flyte_idl()
def to_flyte_idl(
*args,
**kwargs,
) -> google.protobuf.message.Message| Parameter | Type | Description |
|---|---|---|
*args |
||
**kwargs |
flytekit.core.schedule.OnSchedule
Parameters
class OnSchedule(
schedule: typing.Union[flytekit.core.schedule.CronSchedule, flytekit.core.schedule.FixedRate],
)| Parameter | Type | Description |
|---|---|---|
schedule |
typing.Union[flytekit.core.schedule.CronSchedule, flytekit.core.schedule.FixedRate] |
Methods
| Method | Description |
|---|---|
to_flyte_idl() |
to_flyte_idl()
def to_flyte_idl()