Hi there, new to Prefect.
I am trying to create a one-time schedule then cancel it before it executes. I went through the docs and found some answers but things are not being import like
from prefect.schedules import RRuleSchedule
.
Is Prefect 3 Stable?
Can I create a schedule in Prefect3 or I have to switch to Prefect2?
Need help urgently.
b
Bianca Hoch
11/01/2024, 2:08 PM
Hi Abdullah! Yes, Prefect 3 is absolutely stable. It's the version that we're encouraging all newcomers to start off with.
If you're trying to use an rrule schedule, something like this should work:
Copy code
from prefect import flow
@flow(log_prints=True)
def my_rrule_flow(name: str = "world"):
print(f"Hello, {name}!")
if __name__ == "__main__":
my_rrule_flow.serve(
name="my-rrule-deployment",
rrule="FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;BYHOUR=16;BYMINUTE=0"
)
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.