Demonstrates a Cron-Job.
* * * * * *
┬ ┬ ┬ ┬ ┬ ┬
│ │ │ │ │ |
│ │ │ │ │ └ day of week (0 - 7, 1L - 7L) (0 or 7 is Sun)
│ │ │ │ └───── month (1 - 12)
│ │ │ └────────── day of month (1 - 31, L)
│ │ └─────────────── hour (0 - 23)
│ └──────────────────── minute (0 - 59)
└───────────────────────── second (0 - 59, optional)
In order to synthesize the example to Kubernetes YAML, you need to run the following command:
npx cdk8s synth
This will produce dist/app.k8s.yaml
file which you can then apply to your cluster:
kubectl apply -f dist/app.k8s.yaml
You can run the tests with the following command:
npm test -- examples/cron-job