Skip to main content

Deploy Job CronJob type component

Overview

Tasks mainly include two types:

  • Job is responsible for batch processing tasks, that is, tasks that are executed only once. It ensures that one or more Pods of the batch processing task successfully complete.
  • CronJob manages scheduled jobs, periodically creating jobs to execute tasks.

For more details, refer to the official k8s documentation

Usage Process

When creating a component, you can select the job or cronjob type in the advanced settings.

If you select cronjob, you need to fill in the scheduling strategy

After successful creation, the task starts executing. When the job task is completed, it is marked as completed.

After the job task is completed, you can click the restart button to re-execute the task, or click to close the task.

You can modify the deployment type and task strategy in the component's other settings.

Deployment Type

Task Strategy

  • If it is a cronjob type, the timing configuration is mandatory, such as */1 * * * * to execute once a minute.
  • Maximum retry count: If the task fails, the default failure restart count is 6, which can be adjusted through configuration.
  • Parallel task count: The number of Pods that can run simultaneously. If set to 3, then 3 tasks are created and executed simultaneously.
  • Maximum runtime: If the Job runs longer than the set number of seconds, then this Job automatically stops running all Pods.
  • Completion count: The number of Pods that need to successfully execute to complete the Job.

cronjob task status display