CronJobs
You have work that needs to run on a schedule rather than continuously — a
nightly database cleanup, a report, a data sync. On the platform that is a
CronJob Component, created from the Catalog in SVIEW and managed there like
any other Component.
Almost everything you need is self-service in SVIEW. Direct cluster access is
only needed for one thing: triggering a run by hand.
What you can do in SVIEW
| Task | Where |
|---|---|
| Create a scheduled job | Add Component → CronJob in the Catalog |
| Change the schedule, image, or environment variables | The Component's configuration |
| Pause a job without deleting it | The Component's configuration |
| Adjust the job's CPU and memory | The Component's configuration |
| Read recent job output | The Component's Logs tab |
Creating a CronJob
- In SVIEW, open the Service where the job belongs.
- Click Add Component and select CronJob from the Catalog.
- Configure it, including:
schedule— a standard cron expression, for example0 2 * * *for daily
at 02:00 UTCimage— your container image and tag- any environment variables the job needs
- Click Save. The job is deployed and runs automatically on schedule.
Default settings
These apply unless you override them in the Component's configuration.
| Setting | Default | Description |
|---|---|---|
successfulJobsHistoryLimit | 3 | How many completed job records to keep |
failedJobsHistoryLimit | 1 | How many failed job records to keep |
concurrencyPolicy | Forbid | Prevents a new run starting while one is still going |
restartPolicy | Never | A failed pod is not restarted in place — the next scheduled run is the retry |
How to verify it worked
After saving, confirm the Component reaches a healthy state on its dashboard,
then check the Logs tab after the first scheduled run to confirm the job
produced the output you expect.
If you have Kubernetes namespace access
Triggering a run immediately, outside the schedule, is not available in SVIEW —
it needs kubectl. Skip this section unless you need that.
Prerequisite: request Kubernetes namespace access through Access
Requests in SVIEW — see
Namespace Access.
Access is temporary and scoped to your namespace.
Log in through Teleport and select your cluster:
tsh login --user <your-email> --proxy https://teleport.manage.cto2b.eu
tsh kube ls
tsh kube login <your-cluster-name>List the CronJobs in your namespace:
kubectl get cronjobs -n <your-namespace>Trigger a run:
kubectl create job --from=cronjob/<cronjob-name> -n <your-namespace> <job-run-name>Watch it:
kubectl get pods -n <your-namespace> | grep <job-run-name>
kubectl logs -f <pod-name> -n <your-namespace>Clean up the manual run when you are finished. Deleting the job also deletes its
pods:
kubectl delete job <job-run-name> -n <your-namespace>If you have a dedicated observability stack, job logs are also queryable in
Grafana Loki — see
Observability.
Related articles
Updated about 5 hours ago