hey guys, I want to get the start date / time of a...
# flyte-support
g
hey guys, I want to get the start date / time of a workflow, I’ll probably have 3 tasks running, for example:
task1 >> task2 >> task3 >> print("success")
in task3, I want to get the start date / time when this dag started running, would doing
FlyteContextManager.current_context().execution_state.user_space_params.execution_date
be the correct way of getting it? I do not want the start time of the task3, but instead, i want the start of time of task1 / or when the workflow started. Many thanks~
t
i believe you'd get the task execution date. if you want the workflow execution date/time, you must create a launch plan and initialize
kickoff_time_input_arg
param: https://docs.flyte.org/en/latest/flyte_fundamentals/running_and_scheduling_workflows.html#passing-in-the-scheduled-kick-off-time.