Skip to main content
An agent’s routine is its schedule: a cron trigger pinned to one version of the agent, in one mode. Three subcommands manage it. They take the agent’s handle or id. For more control — a timezone, inputs, a named version, several routines — use jstm trigger add routine and jstm trigger update.

schedule show

Show the agent’s routine: its schedule, timezone, mode, version, whether it is on, and its trigger id.
If the agent has no routine, it says so. jstm trigger next-runs <trigger-id> previews when it fires next.
Emit the routine as JSON.

schedule set

Set the routine’s cron expression. The expression is validated locally before any request, so a typo fails immediately with nothing changed.
  • If the agent has a routine, set changes its schedule, and turns it back on if it was cleared. Its mode and version stay as they are.
  • If it has none, set creates one, pinned to the latest version. --mode is then required.
required
A standard five-field cron expression. A routine that set creates uses UTC; an existing routine keeps its own timezone, which schedule show displays. The confirmation line always prints UTC, so check schedule show for a routine in another zone.
simulation or run. Needed only when the agent has no routine yet. To change an existing routine’s mode, use jstm trigger update <trigger-id> --mode.
Emit as JSON.

schedule clear

Turn the routine off. Nothing is deleted: schedule set turns it back on from its next run time. The agent can still be run manually or by other triggers.

Version, mode, and timezone

A routine runs the version it is pinned to, in its own mode. Building a new version does not move it. To change either, or to schedule in your own timezone, use the routine’s trigger id:

Cron expressions

Expressions are evaluated in the routine’s timezone: UTC for a routine schedule set created.

Behavior worth knowing

If the scheduler is down across several scheduled times, it fires the most recent missed one once on recovery, not a burst for every time it missed. Changing a schedule resets its clock to the next future time. It will not back-fire for a time that has already passed.

See also