
Julia CommandsTrigger
CertifiedTrigger a flow when Julia commands match a condition
Julia CommandsTrigger
Trigger a flow when Julia commands match a condition
Polls by running Julia commands in a container (default image julia) and emits when exitCondition matches. Edge mode (the default) emits only on a transition from not matching to matching, remembering the previous result in the namespace KV store. Polls every 60s by default. Accepts 'exit N' or a regex (fallback substring) matched against emitted vars; a failed run has no vars, so only 'exit N' can match a failure.
type: io.kestra.plugin.scripts.julia.CommandsTriggerExamples
Trigger when commands exit with code 42.
id: julia_commands_trigger
namespace: company.team
triggers:
- id: on_exit_42
type: io.kestra.plugin.scripts.julia.CommandsTrigger
interval: PT10S
exitCondition: "exit 42"
edge: true
containerImage: julia
commands:
- julia -e 'exit(42)'
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: "Triggered with exitCode={{ trigger.exitCode }} (condition={{ trigger.condition }})"
Properties
commands *array
Julia commands to execute
Julia commands executed on each poll. Note that beforeCommands and env are not exposed on the trigger, so package installs or configuration must live in the commands or container image.
exitCondition *string
Condition to match
Condition evaluated after each commands execution. The trigger emits only when it matches. 'exit N' compares the exit code, otherwise the string is used as a regex (or substring fallback) against emitted vars (from ::{"outputs": ...}::). On a failed run no vars are available to match against, so only an 'exit N' condition can match a failure. Note that Julia exits with 1 on syntax or runtime errors, so prefer a dedicated exit code (e.g. 'exit 42') for the condition you watch.
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
containerImage string
juliaContainer image for commands execution
Image used to run the Julia commands; defaults to 'julia'. Provide an image that includes Julia.
edge booleanstring
trueEdge trigger mode
When true (default), emit only on a transition from not matching to matching. The previous result is kept in the namespace KV store, keyed by flow and trigger id. When false, emit on every poll that matches.
interval string
PT1MdurationCheck interval
Interval between polling evaluations; default PT60S.
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
condition string
Rendered condition
Rendered value of the exitCondition property for this poll.
exitCode integer
Commands exit code
Exit code returned by the Julia process (may be null if not available).
timestamp string
date-timeTimestamp of the event that fired the trigger
vars object
Commands vars
Vars produced by the task (e.g. via ::{"outputs": {...}}:: convention).