variables field and resolved when the job is submitted.
Variable types
param
User-provided values passed at submission time:param variables must be provided when the job is submitted. Optional variables use the default value when omitted.
A param may also declare a valueType — "string" | "number" | "boolean" | "date" | "array" | "object":
- At submission — the value is validated against the declared type before the job is queued, for every step that uses the param. Values are validated strictly, not coerced (
dateaccepts an ISO string or aDate;arrayandobjectare checked structurally). - At build — a
{{var.X}}feeding a typed consumer (ataskparam’s Zod type, or aserviceCalloperation’s declared param type) is cross-checked against the variable’s type. Anumbervariable wired into a string param fails validation. (nowanddateOffsetcount asstring.)
valueType to leave a param untyped — validated only by whatever consumes it.
dateOffset
A date relative to the submission time:days: -30 resolves to an ISO date string 30 days before submission. days: 0 resolves to the current date.
now
The current ISO timestamp at submission time:Using variables
Reference variables with{{var.variableName}} syntax.
In service params:
Variables in SQL queries are automatically parameterized to prevent SQL injection and formatting issues.
Template syntax
Both can be used together in the same step:
Submitting with variables
When submitting a job programmatically, pass variable values in theparams object:
schedules.json:
Variables with
type: "dateOffset" and type: "now" are resolved automatically — you don’t pass values for them at submission time.
