if the flow run wasn't automatically scheduled, i.e it was triggered manually or through some other api call like create_flow_run_from_deployment()
a
Arun Giridharan
09/07/2022, 6:59 PM
@Mason Menges this is for Prefect 1
m
Mason Menges
09/07/2022, 7:34 PM
I think it's probably still doable in Prefect 1 it might just require some more lift, I haven't tried this before specifically so this would just be my thoughts on it but you may be able to leverage the context/config to do this https://docs-v1.prefect.io/api/latest/utilities/context.html#context-2 specifically the scheduled_start_time since that defaults to Now for unscheduled runs, Another option might be to try setting a parameter for the flow that defaults to True, and you can set it to false when doing a manual run https://docs-v1.prefect.io/core/concepts/parameters.html This is probably the more pythonic way of doing it but requires a tad bit more setup in the flow.
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.