Retrieving a flow's scheduled start time from cont...
# ask-community
l
Hi all, 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 !
r
You can use the get_run_context() and use flow_run.expected_start_time and flow_run.start_time
upvote 2
l
Excellent, thank you !
👍 1