Idempotent start time with CronWorkflows #12955
-
Hi there! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Relying on start time of a step is a risky behavior at all times. I would not recommend doing this anyway, and instead calculate a suitable start time based upon other available information. If you'd still like to rely on it you could run a step to store this. You could use a short lived memoized step to store this information and output it as a parameter, and then the actual step you'd like to use this timestamp for would take it as an input parameter. As it is memoized the next time it runs it will skip it and output the same timestamp for the next step to consume. |
Beta Was this translation helpful? Give feedback.
Also if you really want to do what you're saying, you could use the Workflow's
metadata.creationTimestamp
which is available as theworkflow.creationTimestamp
variable.For CronWorkflows, you can also use the annotation
workflows.argoproj.io/scheduled-time
which is available as theworkflow.scheduledTime
variable.