1.16.14

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 :std:ref:User Guide <cookbook:cron schedules> for further examples.

class CronSchedule(
    cron_expression: typing.Optional[str],
    schedule: typing.Optional[str],
    offset: typing.Optional[str],
    kickoff_time_input_arg: typing.Optional[str],
)
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 :rtype: Text
cron_schedule None :rtype: Schedule.CronSchedule
is_empty None
kickoff_time_input_arg None
rate None :rtype: Schedule.FixedRate
schedule_expression None

Methods

Method Description
from_flyte_idl()
serialize_to_string()
short_string() :rtype: Text.
to_flyte_idl() :rtype: flyteidl.

from_flyte_idl()

def from_flyte_idl(
    pb2_object,
)
Parameter Type Description
pb2_object

serialize_to_string()

def serialize_to_string()

short_string()

def short_string()

:rtype: Text

to_flyte_idl()

def to_flyte_idl()

:rtype: 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 :std:ref:fixed rate intervals chapter in the cookbook for additional usage examples.

class FixedRate(
    duration: datetime.timedelta,
    kickoff_time_input_arg: typing.Optional[str],
)
Parameter Type Description
duration datetime.timedelta
kickoff_time_input_arg typing.Optional[str]

Properties

Property Type Description
cron_expression None :rtype: Text
cron_schedule None :rtype: Schedule.CronSchedule
is_empty None
kickoff_time_input_arg None
rate None :rtype: Schedule.FixedRate
schedule_expression None

Methods

Method Description
from_flyte_idl()
serialize_to_string()
short_string() :rtype: Text.
to_flyte_idl() :rtype: flyteidl.

from_flyte_idl()

def from_flyte_idl(
    pb2_object,
)
Parameter Type Description
pb2_object

serialize_to_string()

def serialize_to_string()

short_string()

def short_string()

:rtype: Text

to_flyte_idl()

def to_flyte_idl()

:rtype: 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 *args
kwargs **kwargs

flytekit.core.schedule.OnSchedule

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