- Documentation
Volcengine Kubernetes Engine
Volcengine Kubernetes Engine
User guide
Workloads
Creating workloads
Creating CronJobs
Creating workloads
Creating CronJobs
Creating CronJobs
A CronJob is a one-off task that runs at a specified time or a task that runs periodically. It corresponds to the CronJob in Kubernetes. You can create a CronJob in a cluster by using an image.
Prerequisites
A container image has been created. You can directly use an image from a third-party container registry, or upload an image to the Container Registry (CR) service. To upload an image to CR, see Pushing and pulling images. Creating DaemonSets on the console
- In the left navigation bar, click Cluster.
- Click Workload > CronJob in the left navigation bar. On the page that appears, click Create CronJob.
- Click Confirm in the lower-right corner of the page.
Creating CronJobs by using kubectl
tip
Before you start creating a CronJob by using kubectl, make sure that the following conditions are met:
- Create the YAML file of the workload. The code of the cronjob-demo.yaml sample file is as follows:
- Run the following command to create the workload.
Operation result
After you create the CronJob, you can view the status of the workload on the Workload > CronJob page. You can click the button in the Actions column to manage the created CronJob. For more operations, see Managing workloads.
Last updated: 2026.10.23 10:41:06