CronJob
Creates Jobs on a repeating cron schedule, keeping a bounded history of finished runs.
| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| accelerator | enum | none | gpu | asic | no | none | inherited |
| concurrency | integer | — | no | — | inherited |
| concurrencyPolicy | enum | allow | forbid | replace | no | allow | inherited |
| failedJobsHistoryLimit | integer | — | no | 1 | inherited |
| fanoutStrategy | enum | none | push | pull | hybrid | no | none | inherited |
| fanoutThreshold | integer | — | no | — | inherited |
| idempotent | boolean | — | no | false | inherited |
| instances | integer | — | no | — | inherited |
| managed | boolean | — | no | false | ▸ false |
| rateControl | enum | none | fixed | aimd | no | none | inherited |
| schedule | string | — | no | — | inherited |
| successfulJobsHistoryLimit | integer | — | no | 3 | inherited |
| suspend | boolean | — | no | false | inherited |
| trigger | enum | queue | stream | schedule | batch | manual | yes | — | ▸ schedule |
Every rule whose selector covers this component's kind or its category. Whether a rule fires depends on the design: its properties, its edges and its groups.
Pure push fan-out over a social graph is brutal at the tail: one post from an account with millions of followers becomes millions of cache writes. A follower threshold above which readers merge at read time bounds that write amplification.
- — all of these hold:
- — the node's `fanoutStrategy` is "push"
- — the node's `fanoutThreshold` has no value
- — the design contains a node of kind graph-database
One worker pool consuming several queues lets a slow or poisoned queue starve the others. That is precisely what the design's per-queue isolation requirement forbids.
- — all of these hold:
- — the node has more than 1 incoming edge from a queue
- — the design requirement `isolation.perQueue` is true
A stateful compute node pinned to exactly one availability zone disappears with that zone, and its state goes with it. Nodes inside a cell are exempt, because there the cell is deliberately single-zone and redundancy comes from the other cells.
- — all of these hold:
- — the node's `stateless` is false
- — the node sits inside exactly 1 availability-zone group
- — this does not hold:
- — the node sits inside at least one cell group
nodes:
- { id: "cronjob", component: "k8s-cronjob" }# yaml-language-server: $schema=../../schema/component.schema.json # Kubernetes CronJob: creates Jobs on a repeating cron schedule. Per "CronJob" the concurrency # policy defaults to Allow, so a run may start while the previous one is still going; # successfulJobsHistoryLimit defaults to 3 and failedJobsHistoryLimit to 1; suspend defaults to # false; and with no startingDeadlineSeconds set the Job occurrences have no deadline. schemaVersion: "1" type: "component" id: "k8s-cronjob" kind: "worker" provider: "k8s" docs: "https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/" aliases: ["cj"] defaults: trigger: "schedule" managed: false properties: concurrencyPolicy: type: "enum" values: ["allow", "forbid", "replace"] default: "allow" successfulJobsHistoryLimit: type: "integer" default: 3 failedJobsHistoryLimit: type: "integer" default: 1 suspend: type: "boolean" default: false