# Error parsing k8s-cron-job.yaml: error converting YAML to JSON: yaml: line 5: did not find expected key

**URL:** <https://discuss.kubernetes.io/t/error-parsing-k8s-cron-job-yaml-error-converting-yaml-to-json-yaml-line-5-did-not-find-expected-key/21592>\
**Category:** microk8s\
**Created:** [October 11, 2022, 7:56am UTC](https://discuss.kubernetes.io/t/error-parsing-k8s-cron-job-yaml-error-converting-yaml-to-json-yaml-line-5-did-not-find-expected-key/21592 "2022-10-11T07:56:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prassu](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@prassu](https://discuss.kubernetes.io/u/prassu)\
**Post date:** [October 11, 2022, 7:56am UTC](https://discuss.kubernetes.io/t/error-parsing-k8s-cron-job-yaml-error-converting-yaml-to-json-yaml-line-5-did-not-find-expected-key/21592/1 "2022-10-11T07:56:48Z")

</div>

apiVersion: batch/v1  
kind: CronJob  
metadata:  
name: cluster-endpoints  
spec:  
schedule: “0 $(date -d “360 minutes” +%H) $(date -d “360 minutes” +%d) $(date -d “360 minutes” +%m) \*”  
jobTemplate:  
spec:  
template:  
spec:  
containers:  
- name: cluster-endpoint-container  
image: busybox  
imagePullPolicy: IfNotPresent  
command:  
- /bin/sh  
- -c  
- date; curl -XPOST -H ‘Content-Type: application/json’ [http://el-cluster-endpoint-eventlistener.tekton-plumbing.svc.local.apple.com:8080](http://el-cluster-endpoint-eventlistener.tekton-plumbing.svc.local.apple.com:8080) -d  
‘{“INFRA\_CICD\_CROSS\_ACCOUNT\_ROLE\_ARN”: “”, “region”: “”, “cluster\_name”: “”}’:  
restartPolicy: OnFailure

---

<div class="post-metadata">

**Author:** ![rthway](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rthway](https://discuss.kubernetes.io/u/rthway)\
**Post date:** [October 11, 2022, 1:14pm UTC](https://discuss.kubernetes.io/t/error-parsing-k8s-cron-job-yaml-error-converting-yaml-to-json-yaml-line-5-did-not-find-expected-key/21592/2 "2022-10-11T13:14:06Z")

</div>

apiVersion: batch/v1

kind: CronJob

metadata:

name: hello

spec:

schedule: “\* \* \* \* \*”

jobTemplate:

```
spec:

  template:

    spec:

      containers:

      - name: hello

        image: busybox:1.28

        imagePullPolicy: IfNotPresent

        command:

        - /bin/sh

        - -c

        - date; echo Hello from the Kubernetes cluster

      restartPolicy: OnFailure

```
