apiVersion: batch/v1beta1 kind: CronJob metadata: name: message-clear-job namespace: dev spec: # schedule: "*/5 * * * *" # 10分钟 schedule: "0 * * * *" # 一小时 jobTemplate: spec: template: spec: containers: - name: message-clear image: 192.168.1.131:8888/job/dev/message-clear:2fa9f99e86f55f384cfd6bced7ad5c9737c963aa env: - name: JM_ENVIRONMENT value: dev imagePullPolicy: IfNotPresent restartPolicy: OnFailure imagePullSecrets: - name: local-harbor