Retrieving a flow's scheduled start time from context
12/07/2022, 12:34 PM
Is there a way of retrieving a flow's scheduled start time from context in Prefect2 ? As we want to use the scheduled time (not the actual run time) as input for some of its tasks. It was easy in Prefect 1 but can't work out how to do it in Prefect2 now that we've migrated.
Thank you !
12/07/2022, 12:58 PM
You can use the get_run_context() and use flow_run.expected_start_time and flow_run.start_time