jars
07/03/2022, 6:16 AMLeonardus Chen
07/03/2022, 11:59 AMAnna Geller
Leonardus Chen
07/03/2022, 12:01 PMflow.schedule = Schedule(clocks=[clocks.CronClock("0,5,10,15,20,25,30,35,40,45,50,55 * * * *")])
Leonardus Chen
07/03/2022, 12:03 PMAnna Geller
Leonardus Chen
07/03/2022, 12:27 PMLeonardus Chen
07/03/2022, 12:27 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")
Leonardus Chen
07/03/2022, 12:28 PMLeonardus Chen
07/03/2022, 12:29 PMAnna Geller
jars
07/03/2022, 1:04 PMAnna Geller
jars
07/03/2022, 1:30 PMAnna Geller
jars
07/03/2022, 1:30 PMjars
07/03/2022, 1:32 PMAnna Geller
Anna Geller
jars
07/03/2022, 2:19 PM