Skip to content

Commit 0654b85

Browse files
authored
[OB-625] adding metaflow/cron annotation to argo workflows (Netflix#1852)
1 parent 9093153 commit 0654b85

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

metaflow/plugins/argo/argo_workflows.py

+8
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,14 @@ def _compile_workflow_template(self):
629629
),
630630
}
631631

632+
if self._schedule is not None:
633+
# timezone is an optional field and json dumps on None will result in null
634+
# hence configuring it to an empty string
635+
if self._timezone is None:
636+
self._timezone = ""
637+
cron_info = {"schedule": self._schedule, "tz": self._timezone}
638+
annotations.update({"metaflow/cron": json.dumps(cron_info)})
639+
632640
if self.parameters:
633641
annotations.update({"metaflow/parameters": json.dumps(self.parameters)})
634642

0 commit comments

Comments
 (0)