diff --git a/metaflow/plugins/argo/argo_workflows.py b/metaflow/plugins/argo/argo_workflows.py index bc038172029..7c1e52baaa8 100644 --- a/metaflow/plugins/argo/argo_workflows.py +++ b/metaflow/plugins/argo/argo_workflows.py @@ -629,6 +629,14 @@ def _compile_workflow_template(self): ), } + if self._schedule is not None: + # timezone is an optional field and json dumps on None will result in null + # hence configuring it to an empty string + if self._timezone is None: + self._timezone = "" + cron_info = {"schedule": self._schedule, "tz": self._timezone} + annotations.update({"metaflow/cron": json.dumps(cron_info)}) + if self.parameters: annotations.update({"metaflow/parameters": json.dumps(self.parameters)})