minecraft-servers/active/cronjob.yaml
2024-02-13 19:59:13 -06:00

25 lines
632 B
YAML

apiVersion: batch/v1
kind: CronJob
metadata:
name: timestamp-cronjob
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
template:
metadata:
labels:
app: timestamp-job
spec:
containers:
- name: timestamp-container
image: busybox
command: ["sh", "-c", "date >> /logs/runs.log"]
volumeMounts:
- name: logs-volume
mountPath: /logs
restartPolicy: OnFailure
volumes:
- name: logs-volume
persistentVolumeClaim:
claimName: data