Hi! Sorry if I miss this from the documentation bu...
# ask-community
j
Hi! Sorry if I miss this from the documentation but, how can I get time context variables (i.e.
today
) inside a flow or task run? In prefect 1.0 you have useful variables through context but I cannot see them in prefect 2.0 context. Thank you!
r
can get the start time - start_time = get_run_context().start_time
j
Thank you @redsquare! I assume that this is the time when the flow started its execution. Is there a way to get the time when the flow was scheduled? It would be very useful for backfill runs
r
yup it is