jars
07/03/2022, 6:16 AMLeonardus Chen
07/03/2022, 11:59 AMAnna Geller
07/03/2022, 12:00 PMLeonardus Chen
07/03/2022, 12:01 PMflow.schedule = Schedule(clocks=[clocks.CronClock("0,5,10,15,20,25,30,35,40,45,50,55 * * * *")])
Anna Geller
07/03/2022, 12:18 PMLeonardus Chen
07/03/2022, 12:27 PMimport prefect
from prefect import Flow, task
from prefect.schedules import Schedule, clocks
@task
def say_hello() -> None:
logger = prefect.context.get("logger")
logger.warning("Hello!")
if __name__ == "__main__":
with Flow("hello-world") as flow:
say_hello()
flow.schedule = Schedule(clocks=[clocks.CronClock("* * * * *")])
flow.register("hello-world")
Anna Geller
07/03/2022, 12:31 PMjars
07/03/2022, 1:04 PMAnna Geller
07/03/2022, 1:05 PMjars
07/03/2022, 1:30 PMAnna Geller
07/03/2022, 1:30 PMjars
07/03/2022, 1:30 PMAnna Geller
07/03/2022, 1:33 PMjars
07/03/2022, 2:19 PM