Prerequisites
- An agent with a working model — a scheduled task against a misconfigured agent fails on every tick. See create and configure an agent.
- A running Temporal worker. Cron triggers are Temporal schedules; without a worker the schedule fires and nothing picks it up.
- An access token, exported as
AGENTAREA_TOKEN, and the API base URL asAGENTAREA_URL.
Steps
Create the trigger
agent_id, name, and trigger_type are the only required fields.
cron_expression is required in practice for a cron trigger — creation is
rejected without it.The schedule is registered in Temporal as
cron-trigger-<trigger_id>, so it
also appears in the Temporal UI and can be paused there. Pausing it there
does not update the trigger record — prefer the API below.Fire it once, without waiting for the schedule
Do not wait until 09:00 to find out the agent’s model is unset.This runs the same path the schedule runs, including conditions, and records
a
TriggerExecution exactly as a scheduled tick would.Put a ceiling on it
A schedule multiplies whatever one run costs. An agent that costs a little
and runs hourly costs a lot by the end of the month, and nobody is watching
at 03:00.Set the budget on the agent or the workspace rather than on the trigger —
the trigger has no budget of its own. See
set a budget.
Verify
Read the execution history. This is the record of what the schedule actually did, including ticks that created no task:status: "success" with a non-null task_id means the tick created a task.
status: "success" with task_id: null means the trigger ran and its conditions
declined to create one — that is a working trigger, not a broken one.task_id into debug a failed task if
the task itself went wrong. A trigger’s job ends when the task exists.
Troubleshooting
The schedule never fires
The schedule never fires
Cron triggers are Temporal schedules. Check that the Temporal service is
reachable and that a worker is running — the schedule fires into a task queue
and a tick with no worker produces nothing. Look for
cron-trigger-<trigger_id> in the Temporal UI: if the schedule is absent,
creation did not reach Temporal; if it is present and firing, the problem is
downstream.It fired at the wrong hour
It fired at the wrong hour
timezone defaults to UTC, not to the server’s local zone or the
workspace’s. A 0 9 * * * trigger created without timezone fires at 09:00
UTC. Set an explicit IANA name.The trigger stopped on its own
The trigger stopped on its own
Crossing
failure_threshold consecutive failures disables the trigger. That
is the safety mechanism working. Nothing re-enables it when the cause is
fixed — read the recent failures, fix the cause, then re-enable explicitly:Executions are recorded but no tasks appear
Executions are recorded but no tasks appear
The conditions are declining every event. A condition whose
type is left
unset is evaluated by a model, so its verdict is not a bug in your
expression — read trigger_data on the execution record to see what the
model was given.A polling trigger does nothing
A polling trigger does nothing
polling is accepted by the API and has no implementation behind it. Use a
cron trigger with data_extractor for periodic fetching. See the limits in
triggers.Related
Triggers and channels
Why scheduling lives in Temporal, and what a channel does.
Debug a failed task
When the trigger worked and the task did not.
Set a budget
The ceiling an unattended schedule needs.
Durable execution
The Temporal machinery underneath.