diff --git a/library/common/1.0.0/templates/spawner/_jobAndCronJob.tpl b/library/common/1.0.0/templates/spawner/_jobAndCronJob.tpl index 325a3452..418037ce 100644 --- a/library/common/1.0.0/templates/spawner/_jobAndCronJob.tpl +++ b/library/common/1.0.0/templates/spawner/_jobAndCronJob.tpl @@ -7,8 +7,10 @@ {{- $_ := set $jobValues "nameOverride" $jobName -}} {{- end -}} - {{- if and (hasKey $job "cron") ($job.cron.enabled) -}} - {{- include "ix.v1.common.class.cronJob" (dict "root" $ "job" $jobValues) -}} + {{- if hasKey $job "cron" -}} + {{- if $job.cron.enabled -}} + {{- include "ix.v1.common.class.cronJob" (dict "root" $ "job" $jobValues) -}} + {{- end -}} {{- else -}} {{- include "ix.v1.common.class.job" (dict "root" $ "job" $jobValues) -}} {{- end -}}