https://prefect.io logo
Title
j

jack

07/12/2022, 4:16 PM
Is there a straighforward way for a task to know when the flow-run started? Wanting to include this in a slack notification.
1
Looking in
prefect.context
, the closest thing I see is
scheduled_start_time
, but we are intending to kick off this flow manually.
k

Kevin Kho

07/12/2022, 4:17 PM
prefect.context.scheduled_start_time is the closest one i can think of
Kicking off a flow just creates a flow with schedule of “now”
j

jack

07/12/2022, 4:20 PM
is
now
evaluated once at the time the flow-run started, or is it evaluated dynamically each time
scheduled_start_time
is accessed?
k

Kevin Kho

07/12/2022, 4:22 PM
When you click the button or hit the API
j

jack

07/12/2022, 4:24 PM
Perfect, that will work.