I define the Flow that is started with multiple starttime and at the specified time, i wanna to run the specified task.
how to do that? tks
k
Kevin Kho
01/13/2022, 1:00 AM
So for example you have a Flow that starts at 1 pm but you have a specific task that you want to start at 6 pm? and then continue on with the rest of the flow? Did I understand right?
a
Anh Nguyen
01/13/2022, 5:33 AM
yes ! thats right
k
Kevin Kho
01/13/2022, 5:38 AM
use the
StartFlowRun
task with
wait=True
and add a
scheduled_start_time
a
Anh Nguyen
01/13/2022, 6:16 AM
plz give me some example for that! many thanks
k
Kevin Kho
01/13/2022, 6:21 AM
Docs here . You need to name that specific task into it’s own Flow because you can only schedule Flows, not tasks
Copy code
start = StartFlowRun(flow_name=.., project_name=..., wait=True)
@task
def get_time():
# four hours later
return datetime.datetime.now() + timedelta(hours=4)
with Flow(...) as flow:
time = get_time()
start(scheduled_start_time=time)
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.