--- title: Deploy Task or Cron Task --- > This type is apply to CLI and UI. ## Describes jobs that run code or a script to completion ```yaml apiVersion: core.oam.dev/v1beta1 kind: Application metadata: name: app-worker spec: components: - name: mytask type: task properties: image: perl count: 10 cmd: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] ``` ## Describes cron jobs that run code or a script to completion ```yaml apiVersion: core.oam.dev/v1beta1 kind: Application metadata: name: cron-worker spec: components: - name: mytask type: cron-task properties: image: perl count: 10 cmd: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] schedule: "*/1 * * * *" ```